Hey everyone. I'm writting a simple chat-like client that uses straight
CSockets (with Cfiles and CArchives of course) and I've run into a bit of a
problem. Initialization and connection run great, the problem is how do I
know if there is data waiting at the socket to be read? Basically if I send
across a message to my server, then call CArchive.readstring() it works
great, however if they are no messages currently waiting, then the program
simply hits an infinite loop :( I know that the method is looping in the
Read method, but I have no idea why.... Okay, so is there someway of telling
if there is data waiting to be read? (NOTE - I have tried to use
CArchive.IsBufferEmpty() but it always returns 1 whether there is data
waiting or not) :( ANy help is greatly appreciated.