I want to write a chat client. I could use RMI for that but I don't want to. Moreover I plan to have a web-interface.
I was reading about XMPP protocol and also the fact that google talk uses it. How can I implement it to write my own chat client, not a client for any other IM service? Is there any library available that could help me implement my own chat service (IM) ?
Multi-User-Chat (MUC) Because MUC rooms are based on XMPP, they can be used to exchange not only plaintext message bodies but a wide variety of XML payloads.
As mentioned above, XMPP works by passing small, structured chunks of XML data between endpoints (clients) via intermediary servers. In other words, if you send a message to your friend using XMPP, that message, as part of an XML document, first travels to a server instead of traveling directly to your friend's device.
The original and "native" transport protocol for XMPP is Transmission Control Protocol (TCP), using open-ended XML streams over long-lived TCP connections. As an alternative to the TCP transport, the XMPP community has also developed an HTTP transport for web clients as well as users behind restricted firewalls.
Check out Smack. Its widely used and mature library for writing xmpp application. Here is an example of writing xmpp client. Here is one more example.
There are many libraries available on the xmpp site iteself. You can choose anyone based on your requirement XMPP Libraries Go for SMACK if you are writing your IM in JAVA.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With