
Net::Rendezvous::Entry - Support module for mDNS service discovery (Apple's Rendezvous)

use Net::Rendezvous;
my $res = new Net::Rendezvous(<service>[, <protocol>]);
foreach $entry ( $res->entries ) { print $entry->name, "\n"; }

Net::Rendezvous::Entry is a module used to manage entries returned by a mDNS service discovery (Apple's Rendezvous). See Net::Rendezvous for more information.

Creates a new Net::Rendezvous::Entry object. The optional argument defines the fully qualifed domain name (FQDN) of the entry. Normal usage of the Net::Rendezvous module will not require the construction of Net::Rendezvous::Entry objects, as they are automatically created during the discovery process.
Reloads the information for the entry via mDNS.
Returns the fully qualifed domain name (FQDN) of entry. An example FQDN is server._afpovertcp._tcp.local
Returns the name of the entry. In the case of the previous example, the name would be 'server'. This name may not be the hostname of the server. For example, names for presence/tcp will be the name of the user and http/tcp will be title of the web resource.
Returns the short hostname of the server. For some services this may be different that the name.
Returns the IP address of the entry.
Returns the TCP or UDP port of the entry.
Returns the binary socket address for the resource and can be used directly to bind() sockets.
Returns the specified attribute from the TXT record of the entry. TXT records are used to specify additional information, e.g. path for http.

print "<HTML><TITLE>Local Websites</TITLE>";
use Net::Rendezvous;
my $res = new Net::Rendezvous('http');
foreach $entry ( $res->entries) {
printf "<A HREF='http://%s/%s'>%s</A><BR>", $entry->address,
$entry->attribute('path'), $entry->name;
}
print "</HTML>";
use Net::Rendezvous;
my $res = new Net::Rendezvous('custom');
my $entry = $res->shift_entry;
socket SOCK, PF_INET, SOCK_STREAM, scalar(getprotobyname('tcp'));
connect SOCK, $entry->sockaddr;
print SOCK "Send a message to the service";
while ($line = <SOCK>) { print $line; }
close SOCK;


This library is free software and can be distributed or modified under the same terms as Perl itself.

The Net::Rendezvous::Entry module was created by George Chlipala <george@walnutcs.com>