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  -  PROTOCOL::XMPP::STREAM (3)

.ds Aq ’

NAME

Protocol::XMPP::Stream - handle XMPP protocol stream

CONTENTS

VERSION

Version 0.006

SYNOPSIS

DESCRIPTION

METHODS

    new

Instantiate a stream object. Used for interacting with the underlying XMPP stream.

Takes the following parameters as callbacks:
o on_queued_write - this will be called whenever there is data queued to be written to the socket
o on_starttls - this will be called when we want to switch to TLS mode
and the following scalar parameters:
o user - username (not the full JID, just the first part)
o pass - password

    on_data

Data has been received, pass it over to the SAX parser to trigger any required events.

    queue_write

Queue up a write for this stream. Adds to the existing send buffer array if there is one.

When a write is queued, this will send a notification to the on_queued_write callback if one was defined.

    write_buffer

Returns the contents of the current write buffer without changing it.

    extract_write

Retrieves next pending message from the write buffer and removes it from the list.

    ready_to_send

Returns true if there’s data ready to be written.

    reset

Reset this stream.

Clears out the existing SAX parsing information and sets up a new Protocol::XMPP::Handler ready to accept events. Used when we expect a new <stream> element, for example after authentication or TLS upgrade.

    dispatch_event

Call the appropriate event handler.

Currently defined events:
o features - we have received the features list from the server
o login - login was completed successfully
o message - a message was received
o presence - a presence notification was received
o subscription - a presence notification was received
o transfer_request - a file transfer request has been received
o file - a file was received

    preamble

Returns the XML header and opening stream preamble.

    jid

Returns the full JID for our user.

If given a parameter, will set the JID to that value, extracting hostname and user by splitting the domain.

    user

Username for SASL authentication.

    pass

Password for SASL authentication.

    hostname

Name of the host

    resource

Fragment used to differentiate this client from any other active clients for this user (as defined by bare JID).

    write_xml

Write a chunk of XML to the stream, converting from the internal representation to XML text stanzas.

    write_text

Write raw text to the output stream.

    login

Process the login.

Takes optional named parameters:
o user - username (not the full JID, just the user part)
o password - password or passphrase to use in SASL authentication

    is_authorised

Returns true if we are authorised already.

    is_loggedin

Returns true if we are logged in already.

    stream

Override the ->stream method from the base class so that we pick up our own methods directly.

    next_id

Returns the next ID in the sequence for outgoing requests.

    on_tls_complete

Continues the next part of the connection when TLS is complete.

    compose

Compose a new outgoing message.

    subscribe

Subscribe to a new contact. Takes a single JID as target.

    unsubscribe

Unsubscribe from the given contact. Takes a single JID as target.

    authorise

Grant authorisation to the given contact. Takes a single JID as target.

    deauthorise

Revokes auth for the given contact. Takes a single JID as target.

AUTHOR

Tom Molesworth <cpan@entitymodel.com>

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 PROTOCOL::XMPP::STREAM (3) 2014-08-04

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