About the command handling of MSN protocol
Peng Jing
pj.phantom at yahoo.com.cn
Mon Jun 22 09:17:40 EDT 2009
Greetings
These days I'm trying to make my own simple MSN. But I got stuck in the command processing. I hope that someone can help me :-)
Some of commands in MSNP are asynchronous such as MSG and CHL. Your buddies may always change their online status and presence information. So the application should keep listenning and receiving commands coming from the server, cache them, put them in a queue and invoke corresponding functions to handle them.
Here are my questions:
1).
I have read part of Pidgin's source code, but I'm still no so clear about the implementation of the command processing mechanism. Could anyone tell me how command processing is implemented in Pidgin?
2).
I plan to employ some multi-threading: one thread keeps listenning to the incoming commands from the server, put them in a cache, and the other thread scans the cache and pick out those complete commands and enqueue them. But this may involve some thread synchronization problems which are a little difficult and tedious to deal with.
Does anyone have some good ideas?
Thanks a lot :-)
----------------------------------------------------
Jing Peng
Beijing University of Posts and Telecommunications
School of Computer Science and Technology
___________________________________________________________
好玩贺卡等你发,邮箱贺卡全新上线!
http://card.mail.cn.yahoo.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pidgin.im/pipermail/support/attachments/20090622/3a3e8804/attachment.html>
More information about the Support
mailing list