AnyEven...omponent(3)

🌸 NAME 🌸

okay bestie, this is the AnyEvent::XMPP::Component(3) page from the User Contributed Perl Documentation β€” and the actual NAME vibe is: AnyEvent::XMPP::Component is the "XML" stream that implements XEP-0114. πŸ’…


✨ SYNOPSIS ✨

          use AnyEvent::XMPP::Component;

          my $con = AnyEvent::XMPP::Component->new (
                       domain => 'chat.jabber.org'
                       host   => 'jabber.org',
                       port   => 5347,
                       secret => 'insecurepasswordforthehackers'
                    );
          $con->reg_cb (session_ready => sub { ... });
          $con->connect;

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this module is literally the XMPP connection to a server that authenticates as a component. No cap. πŸ’–

It's a subclass of AnyEvent::XMPP::Connection and inherits all the methods. For example reg_cb and the stanza sending routines are yours. 🫢

If you want the extra events you can register, look down at the EVENTS section, bestie.

Please note: for a component, several bits of functionality in AnyEvent::XMPP::Connection might have no effect or not the desired effect. Basically, use AnyEvent::XMPP::Component as the component, only handle events that deal with incoming data, and only use functions that send stanzas. πŸŽ€

The event stream_pre_authentication and the authenticate method of AnyEvent::XMPP::Connection have no effect here, because those handle the usual SASL or iq-auth authentication. Jabber components have a completely different authentication mechanism. πŸ’€

Also, lowkey important: support for some XEPs in AnyEvent::XMPP::Ext is just thought for client-side usage. If you miss any functionality, don't hesitate to ask the author or send him a patch! (See AnyEvent::XMPP for contact information.) 🧚

🌟 METHODS 🌟

new (%args)

This is the constructor. It takes the same arguments as the constructor of AnyEvent::XMPP::Connection, along with a few others:

NOTE: some arguments that AnyEvent::XMPP::Connection usually takes have no effect when you use this class. (That would be the 'username', 'password', 'resource' and 'jid' arguments, for example.) πŸ™ˆ
  • secret => $secret β€” $secret is the secret that will be used for authentication with the server. πŸ”

πŸ”₯ EVENTS πŸ”₯

These additional events can be registered with reg_cb:

NOTE: the event stream_pre_authentication should not be handled β€” just ignore it. Don't attach callbacks to it! 🚫
  • session_ready β€” this event means the component has connected successfully and can now be used to transmit stanzas. slay. πŸ‘‘

πŸ‘‘ AUTHOR πŸ‘‘

Robin Redeker, "<elmex at ta-sa.org>", JID: "<elmex at jabber.org>" πŸ’œ

Copyright 2007, 2008 Robin Redeker, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


okay that's the whole page, bestie! 🫢 The footer energy is perl v5.42.2, dated 2026-02-15, and the footer label is AnyEven...omponent(3). periodt. πŸŽ€πŸ’…

πŸ“¦ where this page comes from