udpmulticast 0.0.5 → 0.0.6

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.
Files changed (2) hide show
  1. data/lib/udpmulticast.rb +6 -7
  2. metadata +3 -3
@@ -27,7 +27,6 @@ class UDPMulticast
27
27
  end
28
28
 
29
29
  def client
30
- open_socket
31
30
  @client
32
31
  end
33
32
 
@@ -39,6 +38,12 @@ class UDPMulticast
39
38
  bind
40
39
  end
41
40
 
41
+ def open_socket
42
+ @client = UDPSocket.open
43
+ socket_opt @client, Socket::IP_MULTICAST_TTL, @ttl
44
+ socket_opt @client, Socket::IP_TTL, @ttl
45
+ end
46
+
42
47
  private
43
48
 
44
49
  def multicast_member
@@ -49,12 +54,6 @@ class UDPMulticast
49
54
  @server = UDPSocket.new
50
55
  end
51
56
 
52
- def open_socket
53
- @client = UDPSocket.open
54
- socket_opt @client, Socket::IP_MULTICAST_TTL, @ttl
55
- socket_opt @client, Socket::IP_TTL, @ttl
56
- end
57
-
58
57
  def socket_opt(socket, opt, val)
59
58
  socket.setsockopt Socket::IPPROTO_IP, opt, val
60
59
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: udpmulticast
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Donatas Abraitis