SOCKET Socket = (SOCKET)a_Client->Socket;
u_long Ready;
int BytesQueued = ioctlsocket(Socket, FIONREAD, &Ready);
a_Client->Recieve.reserve(BytesQueued+1);
int BytesRecieved = recv(Socket, (char*)(&a_Client->Recieve.front()), BytesQueued+1, 0);
if (BytesRecieved == INVALID_SOCKET)
{
Sockets : recv'ing from a non-blocking socket returns WSAEWOULDBLOCK
Is this normal or have I incorrectly setup my non-blocking options?
Some of my dodgy code:
Chris Brodie
http:\\fourth.flipcode.com
Chris Brodie
May 30, 2002 12:37 AM
That is exactly what a non-blocking socket should do if there is no data to receive.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement