WSAGetLastError returns 6 after recvfrom call

  • Thread starter Thread starter vramu2223
  • Start date Start date
V

vramu2223

Guest
recvfrom call returns -1 (SOCKET_ERROR), after that, When I immediately call WSAGetLastError, It returns value of 6, as per msdn documentation is describes it as "Specified event object handle is invalid." I could not understand where did I provide or use invalid object handle.

Before calling recvfrom, I have successful creation of socket, bind and also setsocketopt to set timeouts. all these calls are successful, and I did not see any error from these calls, I am also checking my socket id before calling recvfrom to validate it is not invalid socket (skt1 != INVALID_SOCKET)

Still I receive error 6, after recfrom call is made. Need help in understanding the cause.

Continue reading...
 
Back
Top