Class: Rinda::RingServer
- Inherits:
-
Object
- Object
- Rinda::RingServer
- 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
-
#uri ⇒ Object
Returns the value of attribute uri.
Instance Method Summary collapse
-
#initialize(ts, host = '', port = Ring_PORT) ⇒ RingServer
constructor
A new instance of RingServer.
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
#uri ⇒ Object
Returns the value of attribute uri.
19 20 21 |
# File 'lib/controller.rb', line 19 def uri @uri end |