Archived

This topic is now archived and is closed to further replies.

Winsock2 - Non Blocking Sockets

This topic is 5152 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How can I stop winsock2 from blocking, when I call recvfrom on a UDP socket? It says on MSDN that if the socket is set as non-blocking and there is no data to be received, then SOCKET_ERROR is returned and the error code set to WSAEWOULDBLOCK. I think setsockopt() is used to set it as non-blocking but I cant find the option to set it as blocking or non blocking. Can anyone help? Thanks Steve

Share this post


Link to post
Share on other sites