.\" Automatically generated by Pod::Man 4.14 (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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 3pm" .TH AnyEvent::XMPP::Component 3pm "2022-12-06" "perl v5.36.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 \s-1XMPP\s0 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 \s-1EVENTS\s0 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 \s-1SASL\s0 or iq-auth authentication. \*(L"Jabber\*(R" 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 \&\fB\s-1NOTE\s0\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 \&\s-1NOTE:\s0 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, \s-1JID:\s0 \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.