Piers Harding > Jabber-mod_perl-0.04 > Jabber::pkt

Download:
Jabber-mod_perl-0.04.tar.gz

Annotate this POD

CPAN RT

Open  0
Report a bug
Source   Latest Release: Jabber-mod_perl-0.15

NAME ^

Jabber::pkt - Perl wrapper for Jabber pkt for management of XML nodes

SYNOPSIS ^

   Jabber::pkt is a helper class - you do not directly invoke it.  

DESCRIPTION ^

Jabber::pkt is a wrapper for the jabberd session manager (sm) packet object. It provides a framework to access characteristics of the packet such as the to and from addresses, the nad object, an dto construct new packets.

METHODS ^

error()

Generate an error pkt, based on an existing pkt.

 my $epkt = pkt->error($code, $message);

to()

get the packets 'to' address.

 my $to = $pkt->to();

from()

get a packets 'from' address.

 my $from = $pkt->from();

type()

get a packets 'type' eg. message, presence, or iq.

 my $type = $pkt->type();

nad()

get a reference to a packets nad object

 my $nad = $pkt->nad();

tofrom()

swap a packets to and from address, and return the object for convenience

 $pkt = $pkt->tofrom();

dup()

Duplicate the packet

 my $newpkt = $pkt->dup();

router()

Send a packet on it's way

 $pkt->router();

reset()

Reset a packet.

 $pkt->reset();

free()

Free a packet.

 $pkt->free();

id()

Copy the current packets ID to another packet.

 $pkt->id( $otherpkt );