Class: Roby::Distributed::RingServer
- Defined in:
- lib/roby/distributed/drb.rb
Overview
Reimplements Rinda::RingServer, removing the tuplespace intermediate and the creation of most threads. This is done for performance reasons.
Instance Attribute Summary collapse
-
#bind ⇒ Object
readonly
Returns the value of attribute bind.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(ts, options = {}) ⇒ RingServer
constructor
Added a :bind option.
- #service ⇒ Object
Constructor Details
#initialize(ts, options = {}) ⇒ RingServer
Added a :bind option
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/roby/distributed/drb.rb', line 30 def initialize(ts, = {}) = , :bind => Socket.gethostname, :port => Rinda::Ring_PORT @bind = [:bind] @port = [:port] @ts = ts @soc = UDPSocket.new @soc.bind [:bind], [:port] @service = service end |
Instance Attribute Details
#bind ⇒ Object (readonly)
Returns the value of attribute bind.
27 28 29 |
# File 'lib/roby/distributed/drb.rb', line 27 def bind @bind end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
27 28 29 |
# File 'lib/roby/distributed/drb.rb', line 27 def port @port end |
Instance Method Details
#close ⇒ Object
56 57 58 59 |
# File 'lib/roby/distributed/drb.rb', line 56 def close @service.raise Interrupt, "interrupting RingServer" @soc.close end |