Method: Rinda::RingServer#initialize
- Defined in:
- lib/controller.rb
#initialize(ts, host = '', port = Ring_PORT) ⇒ RingServer
Returns a new instance of RingServer.
21 22 23 24 25 26 27 28 |
# File 'lib/controller.rb', line 21 def initialize(ts, host='', port=Ring_PORT) @uri = "druby://#{host}:#{port}" @ts = ts @soc = UDPSocket.open @soc.bind(host, port) @w_service = write_service @r_service = reply_service end |