Method: Discovery::Util::UDP::TX#configure

Defined in:
lib/discovery/util/udp.rb

#configureObject



48
49
50
51
52
53
54
55
# File 'lib/discovery/util/udp.rb', line 48

def configure
  # Set up for multicasting
  @socket.setsockopt Socket::IPPROTO_IP,
                     Socket::IP_MULTICAST_TTL,
                     [1].pack('i')
  # Bind to any available port
  @socket.bind "0.0.0.0", (@bind_port or 0)
end