Confusion in MSDN about winsock connect()
- From: mdk <leun98@xxxxxxxxx>
- Date: Tue, 6 May 2008 13:28:29 -0700 (PDT)
MSDN About the return value of connect():
"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. In this
case, there are three possible scenarios:..."
It doesn't say clearly whether on a non blocking socket if the
connection attempt can be completed immediately, that's, connect on
nonblocking socket returns immediately with success.
.
- Follow-Ups:
- Re: Confusion in MSDN about winsock connect()
- From: Volodymyr M. Shcherbyna
- Re: Confusion in MSDN about winsock connect()
- Prev by Date: Half the speed migrating from Windows 2000 to Windows 2003
- Next by Date: Re: Windows 2003SP2 Socket Sends are much slower than Windows XP on my
- Previous by thread: Half the speed migrating from Windows 2000 to Windows 2003
- Next by thread: Re: Confusion in MSDN about winsock connect()
- Index(es):
Relevant Pages
|