AnyEvent-XMPP
view release on metacpan or search on metacpan
or:
use AnyEvent::XMPP::IM::Connection;
or:
use AnyEvent::XMPP::Client;
DESCRIPTION
This is the head module of the AnyEvent::XMPP XMPP client protocol (as
described in RFC 3920 and RFC 3921) framework.
AnyEvent::XMPP::Connection is a RFC 3920 conforming "XML" stream
implementation for clients, which handles TCP connect up to the resource
binding. And provides low level access to the XML nodes on the XML
stream along with some high level methods to send the predefined XML
stanzas.
AnyEvent::XMPP::IM::Connection is a more high level module, which is
derived from AnyEvent::XMPP::Connection. It handles all the instant
messaging client functionality described in RFC 3921.
AnyEvent::XMPP::Client is a multi account client class. It manages
connections to multiple XMPP accounts and tries to offer a nice high
level interface to XMPP communication.
For a list of "Supported extensions" see below.
There are also other modules in this distribution, for example:
AnyEvent::XMPP::Util, AnyEvent::XMPP::Writer, AnyEvent::XMPP::Parser and
those I forgot :-) Those modules might be helpful and/or required if you
want to use this framework for XMPP.
See also AnyEvent::XMPP::Writer for a discussion about the brokenness of
XML in the XMPP specification.
If you have any questions or seek for help look below under "SUPPORT".
REQUIREMENTS
One of the major drawbacks I see for AnyEvent::XMPP is the long list of
required modules to make it work.
The main outstanding feature of this module in comparison to the other
XMPP (aka Jabber) modules out there is the support for AnyEvent.
AnyEvent permits you to use this module together with other I/O event
based programs and libraries (ie. Gtk2 or Event).
The other modules could often only be integrated in those applications
or libraries by using threads. I decided to write this module because I
think CPAN lacks an event based XMPP module. Threads are unfortunately
not an alternative in Perl at the moment due the limited threading
functionality they provide and the global speed hit. I also think that a
simple event based I/O framework might be a bit easier to handle than
threads.
Another thing was that I didn't like the APIs of the other modules. In
AnyEvent::XMPP I try to provide low level modules for speaking XMPP as
defined in RFC 3920 and RFC 3921 (see also AnyEvent::XMPP::Connection
and AnyEvent::XMPP::IM::Connection). But I also try to provide a high
level API for easier usage for instant messaging tasks and clients (eg.
AnyEvent::XMPP::Client).
Supported extensions
lib/AnyEvent/XMPP.pm view on Meta::CPAN
use AnyEvent::XMPP::IM::Connection;
or:
use AnyEvent::XMPP::Client;
=head1 DESCRIPTION
This is the head module of the L<AnyEvent::XMPP> XMPP client protocol (as described in
RFC 3920 and RFC 3921) framework.
L<AnyEvent::XMPP::Connection> is a RFC 3920 conforming "XML" stream implementation
for clients, which handles TCP connect up to the resource binding. And provides
low level access to the XML nodes on the XML stream along with some high
level methods to send the predefined XML stanzas.
L<AnyEvent::XMPP::IM::Connection> is a more high level module, which is derived
from L<AnyEvent::XMPP::Connection>. It handles all the instant messaging client
functionality described in RFC 3921.
L<AnyEvent::XMPP::Client> is a multi account client class. It manages connections
to multiple XMPP accounts and tries to offer a nice high level interface
to XMPP communication.
For a list of L</Supported extensions> see below.
There are also other modules in this distribution, for example:
L<AnyEvent::XMPP::Util>, L<AnyEvent::XMPP::Writer>, L<AnyEvent::XMPP::Parser> and those I
forgot :-) Those modules might be helpful and/or required if you want to use
this framework for XMPP.
See also L<AnyEvent::XMPP::Writer> for a discussion about the brokenness of XML in the XMPP
specification.
If you have any questions or seek for help look below under L</SUPPORT>.
=head1 REQUIREMENTS
One of the major drawbacks I see for AnyEvent::XMPP is the long list of required
modules to make it work.
lib/AnyEvent/XMPP.pm view on Meta::CPAN
The main outstanding feature of this module in comparison to the other XMPP
(aka Jabber) modules out there is the support for L<AnyEvent>. L<AnyEvent>
permits you to use this module together with other I/O event based programs and
libraries (ie. L<Gtk2> or L<Event>).
The other modules could often only be integrated in those applications or
libraries by using threads. I decided to write this module because I think CPAN
lacks an event based XMPP module. Threads are unfortunately not an alternative
in Perl at the moment due the limited threading functionality they provide and
the global speed hit. I also think that a simple event based I/O framework
might be a bit easier to handle than threads.
Another thing was that I didn't like the APIs of the other modules. In
L<AnyEvent::XMPP> I try to provide low level modules for speaking XMPP as defined
in RFC 3920 and RFC 3921 (see also L<AnyEvent::XMPP::Connection> and
L<AnyEvent::XMPP::IM::Connection>). But I also try to provide a high level API for
easier usage for instant messaging tasks and clients (eg. L<AnyEvent::XMPP::Client>).
=head1 Supported extensions
lib/AnyEvent/XMPP/Connection.pm view on Meta::CPAN
);
$con->reg_cb (stream_ready => sub { print "XMPP stream ready!\n" });
$con->connect; # will do non-blocking connect
=head1 DESCRIPTION
This module represents a XMPP stream as described in RFC 3920. You can issue the basic
XMPP XML stanzas with methods like C<send_iq>, C<send_message> and C<send_presence>.
And receive events with the C<reg_cb> event framework from the connection.
If you need instant messaging stuff please take a look at C<AnyEvent::XMPP::IM::Connection>.
=head1 METHODS
=over 4
=item B<new (%args)>
Following arguments can be passed in C<%args>:
( run in 1.876 second using v1.01-cache-2.11-cpan-df04353d9ac )