Creates a new Resolv::Hosts
, using filename
for its data source.
Creates a new DNS
resolver.
config_info
can be:
Uses /etc/resolv.conf.
String
Path to a file using /etc/resolv.conf’s format.
Hash
Must contain :nameserver, :search and :ndots keys.
:nameserver_port can be used to specify port number of nameserver address.
The value of :nameserver should be an address string or an array of address strings.
:nameserver => ‘8.8.8.8’
:nameserver => [‘8.8.8.8’, ‘8.8.4.4’]
The value of :nameserver_port should be an array of pair of nameserver address and port number.
:nameserver_port => [[‘8.8.8.8’, 53], [‘8.8.4.4’, 53]]
Example:
Resolv::DNS.new(:nameserver => ['210.251.121.21'], :search => ['ruby-lang.org'], :ndots => 1)
Creates a new one-shot Multicast DNS
(mDNS) resolver.
config_info
can be:
Uses the default mDNS addresses
Hash
Must contain :nameserver or :nameserver_port like Resolv::DNS#initialize.
Creates a new DRbObjectTemplate
that will match against uri
and ref
.
Creates a new TupleSpaceProxy
to wrap ts
.
Creates a new SimpleRenewer
that keeps an object alive for another sec
seconds.
Advertises ts
on the given addresses
at port
.
If addresses
is omitted only the UDP broadcast address is used.
addresses
can contain multiple addresses. If a multicast address is given in addresses
then the RingServer
will listen for multicast queries.
If you use IPv4 multicast you may need to set an address of the inbound interface which joins a multicast group.
ts = Rinda::TupleSpace.new rs = Rinda::RingServer.new(ts, [['239.0.0.1', '9.5.1.1']])
You can set addresses as an Array
Object
. The first element of the Array
is a multicast address and the second is an inbound interface address. If the second is omitted then ‘0.0.0.0’ is used.
If you use IPv6 multicast you may need to set both the local interface address and the inbound interface index:
rs = Rinda::RingServer.new(ts, [['ff02::1', '::1', 1]])
The first element is a multicast address and the second is an inbound interface address. The third is an inbound interface index.
At this time there is no easy way to get an interface index by name.
If the second is omitted then ‘::1’ is used. If the third is omitted then 0 (default interface) is used.
Creates a new RingFinger
that will look for RingServers at port
on the addresses in broadcast_list
.
If broadcast_list
contains a multicast address then multicast queries will be made using the given multicast_hops
and multicast_interface.
Creates a RingProvider
that will provide a klass
service running on front
, with a description
. renewer
is optional.
Creates a TupleEntry
based on ary
with an optional renewer or expiry time sec
.
A renewer must implement the renew
method which returns a Numeric
, nil, or true to indicate when the tuple has expired.
Creates a new NotifyTemplateEntry
that watches place
for +event+s that match tuple
.
Creates a new TupleSpace
. period
is used to control how often to look for dead tuples after modifications to the TupleSpace
.
If no dead tuples are found period
seconds after the last modification, the TupleSpace
will stop looking for dead tuples.