Catalyst-Engine-XMPP2

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

          unexpected-request                   424*

        The items marked with an * are of codes that are not standard HTTP
        error codes. Most error codes in this list could be mapped
        literally.

USAGE
    The 'Engine::XMPP2' configuration key expects a hashref that will be
    sent to Net::XMPP2::Connection->new dereferenced. It's important to
    notice, however, that setting "jid" or "resource" in this hash has no
    effect as this values will be set according to the Action-Resource
    mapping.

SENDING MESSAGES
    One of the greater benefits of the XMPP protocol is the hability to
    chain operations in a more complex choreography. In order to do that,
    you just need to send new messages while processing other messages, in
    order to do that, you can access the engine object by using $c->engine
    and use one of the following methods

    $c->engine->send_message($c, $to, $type, $create_cb, %attrs)
        This will call send_message on the connection that generated the
        current request with the parameters as described in
        Net::XMPP2::Connection.

        One important hint: if $create_db is a CODE ref, it will be executed
        with a XML::Writer object in UNSAFE mode as its first argument,
        which means you can call "raw" on it to send unencoded data.

        As you'll be sending the message with the connection that generated
        this request, it will have the complete JID, with the resource, as
        the "from".

    $c->engine->send_presence($c, $type, $create_cb, %attrs)
        Same as above.

    $c->engine->send_iq($c, $type, $create_cb, $result_cb, %attrs)
        Same as above.

        Hint: $result_cb is a coderef that will be executed once the
        response for this iq arrives. This method won't block, so you might
        have to implement a semaphore if the reply for this iq is relevant
        to the rest of this request.

DIRECT CONNECTION MANIPULATION
    This is strongly discouraged, but it might be life-saving for some
    corner cases.

    $c->engine->connection($c)
        Access the connection object that generated the current request.

    $c->engine->connections()
        This returns a hashref identifying all the connections by the
        resource name.

INTERNAL METHODS
    $engine->handle_xmpp_node($app, $resource, $node)
        This method is called by the stanza callbacks in the connections.

SEE ALSO
    Catalyst::Engine, Catalyst::Engine::CGI, HTTP::Request, HTTP::Reponse,
    Catalyst, Net::XMPP2::Connection, Catalyst::Engine::Embeddable

AUTHORS
    Daniel Ruoso "daniel@ruoso.com"

BUG REPORTS
    Please submit all bugs regarding "Catalyst::Engine::XMPP2" to
    "bug-catalyst-engine-xmpp2@rt.cpan.org"

LICENSE
    This library is free software, you can redistribute it and/or modify it
    under the same terms as Perl itself.



( run in 1.137 second using v1.01-cache-2.11-cpan-39bf76dae61 )