GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Net::XMPP2::Component(3) User Contributed Perl Documentation Net::XMPP2::Component(3)

Net::XMPP2::Component - "XML" stream that implements the XEP-0114

   use Net::XMPP2::Component;

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

This module represents a XMPP connection to a server that authenticates as component.

This module is a subclass of "Net::XMPP2::Connection" and inherits all methods. For example "reg_cb" and the stanza sending routines.

For additional events that can be registered to look below in the EVENTS section.

Please note that for component several functionality in Net::XMPP2::Connection might have no effect or not the desired effect. Basically you should use the Net::XMPP2::Component as component and only handle events the handle with incoming data. And only use functions that send stanzas.

No effect has the event "stream_pre_authentication" and the "authenticate" method of Net::XMPP2::Connection, because those handle the usual SASL or iq-auth authentication. "Jabber" components have a completly different authentication mechanism.

Also note that the support for some XEPs in Net::XMPP2::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 Net::XMPP2 for contact information).

new (%args)
This is the constructor. It takes the same arguments as the constructor of Net::XMPP2::Connection along with a few others:

NOTE: Please note that some arguments that Net::XMPP2::Connection usually takes have no effect when using 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.

These additional events can be registered on with "reg_cb":

NOTE: The event "stream_pre_authentication" should _not_ be handled and just ignored. Don't attach callbacks to it!

session_ready
This event indicates that the component has connected successfully and can now be used to transmit stanzas.

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

Copyright 2007 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.

2008-08-01 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.