osc-ruby 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 995c006f465419288008d8e6c710b616104690b7d1db2819707f4c71ed41b8c9
4
- data.tar.gz: 116f65c0f43fbe3b05eccb4a4616db179a11834803c2c765dd67619d2b941f70
3
+ metadata.gz: a91d90ff91f39a91cd81c950008d4c127798e9c800fccfe7f5df711696167e35
4
+ data.tar.gz: 548c9390af5f763913458ada02e0a71f7321720a65298cf125ac17a025832f4a
5
5
  SHA512:
6
- metadata.gz: f09d7818341adcf40d4dfe4979461593dc1aadc3bbfe02e05a78e94db9ba710f91435cf400add89c49e96f0aa4b9be58df7d3a7579e15455cc8c059d0f1a35f9
7
- data.tar.gz: 5afb27ece451be752787fc78d9e50bb8cdaa38e4b1200419c77cfbe409513f101e08581a12b7d57552fe7dcba8bb62b57ffb2c6f4905af68c1444658d448d0b2
6
+ metadata.gz: ccbfa77d5d55529e12cb96da0a2796309c58184755e874222d15192546dbee4d4b1db38ba5578ada33685a2e57fc88e58b046d3bc5bbc805a6f948b59a7adc77
7
+ data.tar.gz: 14438d52dd04715cba9ea19ca4c974611444a81742b6dfcbebb8ebcb6d073a14814aac7acc2c25a27779175016f07281dd4b6a0485085b7797344cdb6fdf6ca0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.2
1
+ 1.1.3
@@ -1,3 +1,5 @@
1
+ require 'ipaddr'
2
+
1
3
  module OSC
2
4
  class BroadcastClient
3
5
 
@@ -5,10 +7,14 @@ module OSC
5
7
 
6
8
  attr_reader :port
7
9
 
8
- def initialize(port)
10
+ def initialize(port, local_ip = nil)
9
11
  @port = port
10
12
  @so = UDPSocket.new
11
13
  @so.setsockopt Socket::SOL_SOCKET, Socket::SO_BROADCAST, true
14
+ if local_ip
15
+ @so.setsockopt Socket::IPPROTO_IP, Socket::IP_MULTICAST_IF, IPAddr.new(local_ip).hton
16
+ @so.bind(local_ip, 0)
17
+ end
12
18
  end
13
19
 
14
20
  def send(mesg)
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: osc-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Colin Harris
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-02 00:00:00.000000000 Z
11
+ date: 2019-06-25 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This OSC gem originally created by Tadayoshi Funaba has been updated
14
- for ruby 2.*/1.9/JRuby compatibility
14
+ for ruby 2.X/JRuby compatibility
15
15
  email: qzzzq1@gmail.com
16
16
  executables: []
17
17
  extensions: []
@@ -49,8 +49,7 @@ files:
49
49
  - spec/unit/osc_simple_packets_spec.rb
50
50
  - spec/unit/osc_types_spec.rb
51
51
  homepage: http://github.com/aberant/osc-ruby
52
- licenses:
53
- - MIT
52
+ licenses: []
54
53
  metadata: {}
55
54
  post_install_message:
56
55
  rdoc_options: []