Net::As...rotocol(3)

πŸ“¦ version 0.003, in alpine 3.24

πŸ¦‹ Net::Async::XMPP::Protocol(3) β€” the group chat where XMPP actually makes sense

Okay bestie, so this is the Perl manual page for Net::Async::XMPP::Protocol β€” like, the common protocol support crew for Net::Async::XMPP. Think of it as the shared brain cell that all the async XMPP stuff leans on. 🧠✨


🌸 VERSION 🌸

Version 0.003 β€” yeah she's vintage, and she's still iconic.


πŸ’… METHODS πŸ’…

⭐ xmpp

Accessor for the underlying Protocol::XMPP::Stream object. That's it, that's the vibe β€” you reach in, you grab the stream, you go live. 🫢

⭐ configure

Configure our handlers. Literally what it says on the tin, no cap. πŸŽ€

⭐ on_starttls

Upgrade the underlying stream to use TLS. Glow-up for your connection β€” she goes from plain text to encrypted main character. πŸ”₯πŸ”’

⭐ on_read

Proxy incoming data through to the underlying Protocol::XMPP::Stream. Like a tiny little relay fairy passing notes along. 🧚

⭐ connect

 $protocol->connect(
   on_connected => sub { warn "connected!" },
   host         => 'talk.google.com',
 )

Establish a connection to the XMPP server. πŸš€

All the available arguments are listed right up there β€” that's the whole menu, bestie. And on_connected gets passed the underlying protocol object, so you can do your little happy dance with it.

πŸ’€ No sneaky extra options hiding in the back. What you see is what you get.

⭐ srv_lookup

Performs a SRV lookup for the given domain and type. πŸ”

This should resolve to a list of (host, port) arrayrefs, in decreasing order of preference β€” so the first one is the favourite, and she works her way down the list. πŸ‘‘

 $proto->srv_lookup('example.com', 'xmpp-client')->on_done(sub {
  printf "Service available at %s:%d\n", @$_ for @_;
 });

Look at that little printf just vibing. %s:%d β€” host and port, slay. πŸ’–


🌈 AUTHOR 🌈

Tom Molesworth <cpan@entitymodel.com> β€” the legend who made all this happen. πŸ‘‘ Shoutout, fr fr.


πŸŽ€ LICENSE πŸŽ€

Copyright Tom Molesworth 2010-2014. Licensed under the same terms as Perl itself. πŸ“œβœ¨


And that's the whole page, bestie β€” documented by perl v5.42.2, dated 2026-02-15. Go forth and speak XMPP fluently. Mwah. πŸ’œπŸ¦‹

πŸ“¦ where this page comes from