https://github.com/abhinavsingh/JAXL/tree/v3.x
Jaxl v3.x is a successor of v2.x (and is NOT backward compatible), carrying a lot of code from v2.x while throwing away the redundant part. Several components have been re-written keeping in my mind feedback from the developer community over the last 4 years.
Jaxl v3.x is an object oriented, non-blocking, event based modular XMPP client/component library.
Library src folder contains following sub-folders:
/examples
a bunch of working examples/xmpp
contains generic xmpp rfc implementation/xep
contains various xmpp xep implementation/core
contains generic networking and event components/tests
test suite/jaxl.php
main fileWith v3.x, every thing has been mapped into an object:
JAXLEvent
event registry and emitter classJAXLSocket
socket level operationsJAXLXmlStream
streaming XML parserJAXLXml
internal XML object implementationXMPPStream
base xmpp rfc implementationXMPPStanza
wrapper over JAXLXml
for easy access patternsXMPPIq
xmpp iq stanza object (extends XMPPStanza
)XMPPMsg
xmpp msg stanza object (extends XMPPStanza
)XMPPPres
xmpp pres stanza object (extends XMPPStanza
)XMPPXep
abstract xmpp extension (extended by every XEP implementation)XMPPJid
xmpp jid object1) include jaxl.php
and initialize a new JAXL instance
$cfg = array('jid'=>'us...@domain.dtl', 'pass'=>'password'); $xmpp = new JAXL($cfg);
2) register callbacks on events
$xmpp->add_cb('on_auth_success', function() { global $xmpp; $xmpp->set_status("available!"); // set your status $xmpp->get_vcard(); // fetch your vcard $xmpp->get_roster(); // fetch your roster list }); $xmpp->add_cb('on_chat_message', function($msg) { global $xmpp; // echo back $msg->to = $msg->from; $msg->from = $xmpp->full_jid->to_string(); $xmpp->send($msg); });
3) finally start configured JAXL instance
$xmpp->start();
To view this discussion on the web visit https://groups.google.com/d/msg/jaxl/-/vQ3RP5O5dLUJ.--
You received this message because you are subscribed to the Google Groups "jaxl" group.
To post to this group, send email to ja...@googlegroups.com.
To unsubscribe from this group, send email to jaxl+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jaxl?hl=en.
To unsubscribe from this group, send email to jaxl+unsubscribe@googlegroups.com.
Just for an update on this thread:
Jaxl v3.x is a successor of v2.x (and is NOT backward compatible), carrying a lot of code from v2.x while throwing away the ugly parts. A lot of components have been re-written keeping in mind the feedback from the developer community over the last 4 years. Also Jaxl now shares a few philosophies from my experience with erlang and python languages.
Jaxl is an asynchronous, non-blocking I/O, event based PHP library for writing custom TCP/IP client and server implementations. From it’s previous versions, library inherits a full blown stable support for XMPP protocol stack. In v3.0, support for HTTP protocol stack was also added.
At the heart of every protocol stack sits a Core stack. It contains all the building blocks for everything that we aim to do with Jaxl library. Both XMPP and HTTP protocol stacks are written on top of the Core stack. Infact the source code of protocol implementations knows nothing about the standard (inbuilt) PHP socket and stream methods.
documentation now available at:Hi,could you please post the download link here for 3.x
thanks,
Alakananda
In coming weeks, under this series of blog posts titled “Working with Jaxl – A Networking Library in PHP”, I will cover following major topics with sample code:
I've noticed that there hasn't been much activity on this project in a while. Is this still an active project, or is it dead?I'm currently using JAXL for chat logging and for some simple chat commands, and would love to see it expand to cover more functionality.