On Tue, Jun 23, 2009 at 09:53:48PM +0800, Peng Jing wrote: > Thanks for your reply. > Did you mean this: > we do all the things in a single thread: > 1. Invoke select() or use some similar methods to read the data coming > from the socket when there is any. > 2. If we read data successfully, parse the data received(Maybe we need > to tokenize the commands and enqueue them). > 3. If there are unhandled commands in the queue, pick one from the head > of queue, call the corresponding functions to handle it.
If you always process the commands right away, then there will never be any unhandled command other than the current one. -khc _______________________________________________ Support mailing list [email protected] http://pidgin.im/cgi-bin/mailman/listinfo/support You can unsubscribe from the list's website above.
