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 +4 -4
- data/VERSION +1 -1
- data/lib/osc-ruby/broadcast_client.rb +7 -1
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a91d90ff91f39a91cd81c950008d4c127798e9c800fccfe7f5df711696167e35
|
4
|
+
data.tar.gz: 548c9390af5f763913458ada02e0a71f7321720a65298cf125ac17a025832f4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccbfa77d5d55529e12cb96da0a2796309c58184755e874222d15192546dbee4d4b1db38ba5578ada33685a2e57fc88e58b046d3bc5bbc805a6f948b59a7adc77
|
7
|
+
data.tar.gz: 14438d52dd04715cba9ea19ca4c974611444a81742b6dfcbebb8ebcb6d073a14814aac7acc2c25a27779175016f07281dd4b6a0485085b7797344cdb6fdf6ca0
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
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.
|
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-
|
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
|
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: []
|