AnyEvent-XMPP

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

Why (yet) another XMPP module?
    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).

README  view on Meta::CPAN

        This example script just connects to a server and sends a message
        and also displays incoming messages on stdout.

    samples/conference_lister
        See below.

    samples/room_lister
        See below.

    samples/room_lister_stat
        These three scripts implements a global room scan.
        "conference_lister" takes a list of servers (the file is called
        "servers.xml" which has the same format as the xml file at
        <http://www.jabber.org/servers.xml>). It then scans all servers for
        chat room services and lists them into a file "conferences.stor",
        which is a Storable dump.

        "room_lister" then reads that file and queries all services for
        rooms, and then all rooms for their occupants. The output file is
        "room_data.stor", also a Storable dump, which in turn can be read
        with "room_lister_stat", which transform the data structures into

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.pm  view on Meta::CPAN

=item B<samples/conference_lister>

See below.

=item B<samples/room_lister>

See below.

=item B<samples/room_lister_stat>

These three scripts implements a global room scan.  C<conference_lister> takes
a list of servers (the file is called C<servers.xml> which has the same format as
the xml file at L<http://www.jabber.org/servers.xml>). It then scans all
servers for chat room services and lists them into a file C<conferences.stor>,
which is a L<Storable> dump.

C<room_lister> then reads that file and queries all services for rooms, and then
all rooms for their occupants. The output file is C<room_data.stor>, also a L<Storable>
dump, which in turn can be read with C<room_lister_stat>, which transform
the data structures into something human readable.



( run in 1.136 second using v1.01-cache-2.11-cpan-49f99fa48dc )