Class: RSwim::Integration::UDP::Node
- Defined in:
- lib/rswim/integration/udp/node.rb
Overview
Node implementation that sends and listens using UDP
Instance Method Summary collapse
-
#initialize(my_host, seed_hosts, port, t_ms, r_ms) ⇒ Node
constructor
A new instance of Node.
Methods inherited from Node
#append_custom_state, #start, #subscribe, udp
Constructor Details
#initialize(my_host, seed_hosts, port, t_ms, r_ms) ⇒ Node
Returns a new instance of Node.
8 9 10 11 12 |
# File 'lib/rswim/integration/udp/node.rb', line 8 def initialize(my_host, seed_hosts, port, t_ms, r_ms) @port = port my_host ||= Socket.ip_address_list.find(&:ipv4_private?).ip_address super(my_host, seed_hosts, t_ms, r_ms) end |