Net::R...ublish(3pm)
π Net::Rendezvous::Publish(3pm) π
okay bestie, so this is a page from the User Contributed Perl Documentation, and it's about one very specific slay: publishing Rendezvous services. no cap. let's get into it π¦
β¨ NAME β¨
Net::Rendezvous::Publish β publish Rendezvous services π
πΈ SYNOPSIS πΈ
like, here's the whole vibe in one go:
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 ) }
π DESCRIPTION π
okay so this section is literally empty in the original. it's giving minimalism. it's giving "the METHODS section is right there, babes". nothing to see, moving on π
π«Ά METHODS π«Ά
new π
Creates a new publisher handle. that's it, that's the whole thing. iconic behaviour honestly.
publish( %definition ) π
Returns a Net::Rendezvous::Publish::Service object. bestie, the following keys are the ones that actually mean something in the service definition hash:
nameβ a descriptive name for the service. you know, the cute label β¨typeβ the type of service. this is a string of the form_service._protocol.portβ the port you're advertising the service on. and listen, 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 use9(the discard service). yes, nine. the discard service. that's the move πdomainβ the domain in which to advertise a service. defaults to"local."(period included, she's specific like that).
step( $seconds ) π¦
Spend at most $seconds seconds handling network events and updating internal state. so like, you hand her a time budget and she uses up to that much. no more. she's disciplined π
π TODO π
At some point the author may learn enough of the mDNS protocol to write a pure-perl responder. and per the page itself: "That'll be nifty." fr fr, nifty is underselling it π
π AUTHOR π
Richard Clamp <richardc@unixbeard.net>
π COPYRIGHT π
Copyright 2004, 2005, 2006, Richard Clamp. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
β SEE ALSO β
Net::Rendezousβ for service browsing. (yes, that's the spelling on the page, bestie, we don't touch it, we don't fix it, we respect it π«‘)Net::Rendezvous::Publish::Backend::*β you'll need one of these to talk to your local mDNS responder. like, you need one. it's not optional. the*is doing a lot of heavy lifting here and we love her for it.
and that's the whole page, periodt π
this was Net::R...ublish(3pm), perl v5.34.0, dated 2022-06-30 β tysm for reading, ily, go publish something cute πβ¨π
π¦ where this page comes from
- debian bookworm: libnet-rendezvous-publish-perl 0.04-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libnet-rendezvous-publish-perl 0.04-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libnet-rendezvous-publish-perl 0.04-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms