Net::Rendezvous::Publish(3pm)

Net::Rendezvous::Publish3pm

Publish rendezvous services

Usage

 use Net::Rendezvous::Publish;
 my $publisher = Net::Rendezvous::Publish->new
   or die "couldn't make a Responder object";
 my $service = $publisher->publish(
     name => "My HTTP Server",
     type => '_http._tcp',
     port => 12345,
 );
 while (1) { $publisher->step( 0.01 ) }

Overview

Methods

new

Creates a new publisher handle

publish( %definition )

Returns a Net::Rendezvous::Publish::Service object. The following keys are meaningful in the service definition hash.

name

A descriptive name for the service.

type

The type of service. This is string of the form _service._protocol.

port

The port on which you're advertising the service. If you're not using a port (and instead just using mDNS as a way of propogating other service information) it's common practice to use 9 (the discard service)

domain

The domain in which to advertise a service. Defaults to "local."

step( $seconds )

Spend at most $seconds seconds handling network events and updating internal state.

Todo

At some point I may learn enough of the mDNS protocol to write a pure-perl responder. That'll be nifty.

Releases

9 releases since Debian 5.0 (Lenny); the text changed 5 times.

  1. 5.0
  2. 6.0–7
  3. 8
  4. 9–10
  5. 11
  6. 12–13

Author

Richard Clamp <[email protected]>

From libnet-rendezvous-publish-perl 0.04-5 in Debian 13 (Trixie). Parsed by carta from the page's man source.