WinSock2 questions - really simple READ ME!

Started by
10 comments, last by BeanDog 23 years, 10 months ago
Dont you use the winsock documentation??, it does not return true or false. =)

---- READ ----
If no error occurs, connect returns zero. Otherwise, it returns SOCKET_ERROR, and a specific error code can be retrieved by calling WSAGetLastError.

On a blocking socket, the return value indicates success or failure of the connection attempt.

With a nonblocking socket, the connection attempt cannot be completed immediately. In this case, connect will return SOCKET_ERROR, and WSAGetLastError will return WSAEWOULDBLOCK.
Ries
Advertisement
screw it. I''ll use MFC and do it in 8 lines of code.

This topic is closed to new replies.

Advertisement