Haxe XMPP/Jabber library | Documentation | Test
The Extensible Messaging and Presence Protocol (XMPP) is an open technology for real-time communication, which powers a wide range of applications including instant messaging, presence, multi-party chat, voice and video calls, collaboration, lightweight middleware, content syndication, and generalized routing of XML data. The XMPP protocols are free, open, public, and easily understandable.
XEPS
- XEP-0004 DataForms
- XEP-0012 LastActivity
- XEP-0016 PrivacyLists
- XEP-0030 ServiceDiscovery
- XEP-0045 MUChat
- XEP-0047 In-Band Bytestreams
- XEP-0049 Private XML Storage
- XEP-0054 VCardTemp
- XEP-0055 Search
- XEP-0060 PubSub
- XEP-0065 SOCKS5 Bytestreams
- XEP-0071 XHTML-IM
- XEP-0077 In-Band Registration
- XEP-0082 XMPP Date and Time Profiles
- XEP-0085 ChatStateNotification
- XEP-0092 SoftwareVersion
- XEP-0096 SI File Transfer
- XEP-0106 JID Escaping
- XEP-0114 Jabber Component Protocol
- XEP-0115 Entity Capabilities
- XEP-0124 BOSH
- XEP-0163 PersonalEvent
- XEP-0191 Simple Communications Blocking
- XEP-0199 Ping
- XEP-0202 EntityTime
- XEP-0203 DelayedDelivery
- XEP-0206 BOSH
- XEP-0231 Bits of Binary
- XEP-0224 Attention
- XEP-XXXX Linked Process Protocol
- XEP-XXXX GMail Notifiy
- XEP-XXXX Jingle RTMP Transport
- XEP-XXXX Jingle RTMFP Transport
Compiler flags
- -D xmpp_debug Print XMPP transfer (see jabber.XMPPDebug for options)
- -D jabber_debug Print verbose debug information
- -D jabber_component Set to build xmpp server components (use jabber.component.* instead of jabber.client.*)
- -D jabber_flashsocketbridge Enable to use a flash socket bridge as stream connection for the js/browser target (see hxmpp/util/flash-socketbridge)
- -D nodejs Set to build for nodejs
BOSH/HTTP
BOSH essentially provides a "drop-in" alternative to a long-lived, bidirectional TCP connection using a request-response mechansim over HTTP. To use it you have to connect your client to the BOSH adress of your XMPP server.
Apache, for example, doesn’t know about your XMPP server, therefore you have to forward requests using the proxy module.
- Activate mod_proxy apache module
ln -s /etc/apache2/mods-available/proxy.load /etc/apache2/mods-enabled/
- Add following line to proxy.load to activate the module
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
- Add a directive to your host settings to proxy requests from http://localhost/httpbind to http://localhost:7070/http-bind/
<VirtualHost *:80>
...
ProxyRequests Off
ProxyPass /http-bind http://localhost:7070/http-bind/
ProxyPassReverse /http-bind http://localhost:7070/http-bind/
...
</VirtualHost>
- Restart apache
service apache2 restart
- You can now use this URL to connect to your server
var cnx = new jabber.BOSHConnection( "server.org", "127.0.0.1/httpbind/" );
HXMPP is open source and licensed under MIT | https://github.com/tong/hxmpp
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.