Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I implement XMPP protocol for my own chat client? [closed]

Tags:

java

chat

api

xmpp

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) ?

like image 946
Suhail Gupta Avatar asked Aug 07 '13 06:08

Suhail Gupta


People also ask

Which method is used for exchange of message in XMPP protocol?

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.

How do I use XMPP protocol?

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.

Which protocol methods can be used with XMPP to work with HTTP for data communication?

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.


2 Answers

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.

like image 189
Santosh Avatar answered Oct 25 '22 19:10

Santosh


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.

like image 26
amrinder007 Avatar answered Oct 25 '22 18:10

amrinder007