Class: RSwim::Integration::UDP::Node

Inherits:
Node
  • Object
show all
Defined in:
lib/rswim/integration/udp/node.rb

Overview

Node implementation that sends and listens using UDP

Instance Method Summary collapse

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