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


Manual Reference Pages  -  NET::ASYNC::XMPP (3)

.ds Aq ’

NAME

Net::Async::XMPP - asynchronous XMPP client based on Protocol::XMPP and IO::Async::Protocol::Stream.

CONTENTS

VERSION

version 0.002

SYNOPSIS



 use IO::Async::Loop;
 use Net::Async::XMPP;
 my $loop = IO::Async::Loop->new;
 my $client = Net::Async::XMPP::Client->new(
        on_message              => sub {
                my ($client, $msg) = @_;
                warn "Message from " . $msg->from . " subject " . $msg->subject . " body " . $msg->body;
                $msg->reply(
                        body => Message received:  . $msg->body
                );
        },
        on_contact_request      => sub {
                my ($client, $contact) = @_;
                warn "Contact request from " . $contact->jid;
        },
        on_presence             => sub {
                my ($client, $contact) = @_;
                warn "Had a presence update from " . $contact->jid;
        },
 );
 $loop->add($client);
 $client->login(
        jid     => user@example.com,
        password => $ENV{NET_ASYNC_XMPP_PASSWORD},
 );
 $loop->run;



DESCRIPTION

See the Net::Async::XMPP::Client or Net::Async::XMPP::Server subclasses for more details.

AUTHOR

Tom Molesworth <cpan@entitymodel.com>

CONTRIBUTORS

With thanks to the following for contribution:
o Arthur Axel fREW Schmidt for testing, documentation, pointing out some of my mistakes, that sort of thing
o Paul LeoNerd Evans for adding Futures to IO::Async (and writing both in the first place)
o Matt Trout for testing early versions

LICENSE

Copyright Tom Molesworth 2010-2014. Licensed under the same terms as Perl itself.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::ASYNC::XMPP (3) 2014-08-04

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