Skip to content
On this page

End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class · Ruby 3.1

Rinda::RingFinger

< Object 4 instance methods 4 class methods

RingFinger is used by RingServer clients to discover the RingServer’s TupleSpace. Typically, all a client needs to do is call RingFinger.primary to retrieve the remote TupleSpace, which it can then begin using.

To find the first available remote TupleSpace:

Example
Rinda::RingFinger.primary

To create a RingFinger that broadcasts to a custom list:

Example
rf = Rinda::RingFinger.new  ['localhost', '192.0.2.1']
rf.primary

Rinda::RingFinger also understands multicast addresses and sets them up properly. This allows you to run multiple RingServers on the same host:

Example
rf = Rinda::RingFinger.new ['239.0.0.1']
rf.primary

You can set the hop count (or TTL) for multicast searches using multicast_hops.

If you use IPv6 multicast you may need to set both an address and the outbound interface index:

Example
rf = Rinda::RingFinger.new ['ff02::1']
rf.multicast_interface = 1
rf.primary

At this time there is no easy way to get an interface index by name.

Class methods 4

Instance methods 4

Attributes
Read & Write

The list of addresses where RingFinger will send query packets.

Read & Write

Maximum number of hops for sent multicast packets (if using a multicast address in the broadcast list). The default is 1 (same as UDP broadcast).

Read & Write

The interface index to send IPv6 multicast packets from.

Read & Write

The port that RingFinger will send query packets to.

Read & Write

Contain the first advertised TupleSpace after lookup_ring_any is called.