How does a chatting client update the presence status of friends in contacts list? [closed]
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this questionDoes it use a special protocol for this? Is it a push based or polling service?
It depends on how it's implemented. If there is a central server managing the clients connected, you can
- use polling and have the client get the current status from the server
- use some sort of push protocol, but then the client would have to open its own TCP or UDP server port so the server application can initiate communication to the client
If there's no server, there are many papers and examples of peer-to-peer communication. In that case I'd assume that every client is a server as well, so it's kindof like 2) above.
AFAIK there's no "standard protocol" for chat applications, but there are some open implementations one could use (Jabber).
精彩评论