On this page
End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class · Ruby 3.2
Rinda::RingServer
A RingServer allows a Rinda::TupleSpace to be located via UDP broadcasts. Default service location uses the following steps:
-
A
RingServerbegins listening on the network broadcast UDP address. -
A
RingFingersends a UDP packet containing theDRbURIwhere it will listen for a reply. -
The
RingServerreceives the UDP packet and connects back to the providedDRbURIwith theDRbservice.
A RingServer requires a TupleSpace:
Example
ts = Rinda::TupleSpace.new rs = Rinda::RingServer.new
RingServer can also listen on multicast addresses for announcements. This allows multiple RingServers to run on the same host. To use network broadcast and multicast:
Example
ts = Rinda::TupleSpace.new rs = Rinda::RingServer.new ts, %w[Socket::INADDR_ANY, 239.0.0.1 ff02::1]