what i meant by using select if you know you need to recieve a huge amount of data, only once! using selcet you can tell when you have incoming data, and then recv it, without any blocking!
Printable View
what i meant by using select if you know you need to recieve a huge amount of data, only once! using selcet you can tell when you have incoming data, and then recv it, without any blocking!
I know select() will tell you that there is data available but not how much. ioctlsocket will tell you how many bytes are waiting allowing you to request that many bytes from recv without blocking.
It actually tells you how many bytes were available up to the time ioctlsocket returns - it doesn't make any guarantees about the availability of data later.