Class: Rinda::RingServer

Inherits:
Object
  • Object
show all
Defined in:
lib/controller.rb

Overview

Extend Rinda::RingServer to allow a hostname/ipaddress to be passed in as parameter arguments. Also pass back attribute for ring server uri.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#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

Instance Attribute Details

#uriObject

Returns the value of attribute uri.



19
20
21
# File 'lib/controller.rb', line 19

def uri
  @uri
end