AcceptEx vs. WSAAccept
That depends on what you're trying to achieve.
The main disadvantage of AcceptEx is that function is not supported on
Windows Me/98/95.
From MSDN:
"The AcceptEx function combines several socket functions into a single
API/kernel transition. The AcceptEx function, when successful, performs
three tasks:
- A new connection is accepted.
- Both the local and remote addresses for the connection are returned.
- The first block of data sent by the remote is received."
So it should work faster then WSAAccept. Another plus is that AcceptEx
function uses overlapped I/O, unlike the accept function. You may read the
differences between AcceptEx(...) and accept(...) in MSDN site:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/acceptex_2.asp
accept(...) simply calls inside WSAAccept(...).
--
Vladimir
|