.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "AnyEvent::XMPP::Component 3" .TH AnyEvent::XMPP::Component 3 2023-07-25 "perl v5.38.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME AnyEvent::XMPP::Component \- "XML" stream that implements the XEP\-0114 .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use AnyEvent::XMPP::Component; \& \& my $con = AnyEvent::XMPP::Component\->new ( \& domain => \*(Aqchat.jabber.org\*(Aq \& host => \*(Aqjabber.org\*(Aq, \& port => 5347, \& secret => \*(Aqinsecurepasswordforthehackers\*(Aq \& ); \& $con\->reg_cb (session_ready => sub { ... }); \& $con\->connect; .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This module represents a XMPP connection to a server that authenticates as component. .PP This module is a subclass of \f(CW\*(C`AnyEvent::XMPP::Connection\*(C'\fR and inherits all methods. For example \f(CW\*(C`reg_cb\*(C'\fR and the stanza sending routines. .PP For additional events that can be registered to look below in the EVENTS section. .PP Please note that for component several functionality in AnyEvent::XMPP::Connection might have no effect or not the desired effect. Basically you should use the AnyEvent::XMPP::Component as component and only handle events the handle with incoming data. And only use functions that send stanzas. .PP No effect has the event \f(CW\*(C`stream_pre_authentication\*(C'\fR and the \f(CW\*(C`authenticate\*(C'\fR method of AnyEvent::XMPP::Connection, because those handle the usual SASL or iq-auth authentication. "Jabber" components have a completly different authentication mechanism. .PP Also note that the support for some XEPs in AnyEvent::XMPP::Ext is just thought for client side usage, if you miss any functionaly don't hesitate to ask the author or send him a patch! (See AnyEvent::XMPP for contact information). .SH METHODS .IX Header "METHODS" .IP "\fBnew (%args)\fR" 4 .IX Item "new (%args)" This is the constructor. It takes the same arguments as the constructor of AnyEvent::XMPP::Connection along with a few others: .Sp \&\fBNOTE\fR: Please note that some arguments that AnyEvent::XMPP::Connection usually takes have no effect when using this class. (That would be the 'username', 'password', 'resource' and 'jid' arguments for example.) .RS 4 .ie n .IP "secret => $secret" 4 .el .IP "secret => \f(CW$secret\fR" 4 .IX Item "secret => $secret" \&\f(CW$secret\fR is the secret that will be used for authentication with the server. .RE .RS 4 .RE .SH EVENTS .IX Header "EVENTS" These additional events can be registered on with \f(CW\*(C`reg_cb\*(C'\fR: .PP NOTE: The event \f(CW\*(C`stream_pre_authentication\*(C'\fR should _not_ be handled and just ignored. Don't attach callbacks to it! .IP session_ready 4 .IX Item "session_ready" This event indicates that the component has connected successfully and can now be used to transmit stanzas. .SH AUTHOR .IX Header "AUTHOR" Robin Redeker, \f(CW\*(C`\*(C'\fR, JID: \f(CW\*(C`\*(C'\fR .SH "COPYRIGHT & LICENSE" .IX Header "COPYRIGHT & LICENSE" Copyright 2007, 2008 Robin Redeker, all rights reserved. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.