While working on my IRC bot today (joins a channel and responds to things people say to it), I'd find that it's simply not enough to execute a recv() loop to get all the data. I'd also have to actually scan for a "PING" string upon completion of the recv() loop and if not found, repeat the loop again.
Posted on 2004-09-12 14:40:42 by Al_Leitch
another tip you could use is, select(). this allows you to check if theres data wating for you or not. if there isnt you can do other things insted of blocking with a recv().
Posted on 2004-09-12 21:26:07 by Qages
best to use non-blocking sockets, and event/message notification instead of select
Posted on 2004-09-12 23:40:26 by comrade