Although I have read a lot about WSAsend (msdn), I still need some clarifications.
Part of my code:
int rc;
rc=WSASend(Socket,....);
if (rc==0) {....}
else if ((rc == SOCKET_ERROR) && (WSA_IO_PENDING != (err = WSAGetLastError())))
{
printf("WSASend failed with error: %d Socket(%d) \n", err,(pTmp1->Socket));
....
}
There is said in msdn that WSAsend operation may sometimes completes immediately returning zero (it never happened during my test server ). So if this happens, the GetQueuedCompletionStatus
will get notification?
Thanks in advance.