That's was my point , I believe that WSAAsyncSelect/Even inside call old bsd
Post by Alun Jones [MS MVP]Post by Arkady FrenkelAre you sure that WSA_FLAG_OVERLAPPED change socket to non-blocked , AFAIK
only
WSAAsyncSelect()/WSAAsyncEvent() do that in windows.
WSA_FLAG_OVERLAPPED is required to be set, if you call WSASocket to create
your socket, to create a socket that _can_ become non-blocking. In fact, if
you create a socket without WSA_FLAG_OVERLAPPED, there are all sorts of
restrictions on what you can do with it - I'm not sure that it's ever worth
doing so.
However, once you've got a blocking socket that is capable of being made
non-blocking, you can make it non-blocking with any of the following
WSAAsyncSelect()
WSAEventSelect()
ioctlsocket(), with parameter FIONBIO.
Once a socket is non-blocking, if you want to make it blocking, you will
want to de-register any events or window messages associated with it (by
calling WSAEventSelect or WSAAsyncSelect as outlined in their
documentation), and then call ioctlsocket, with parameter FIONBIO.
[If that's confused anyone - remember that ioctlsocket() with parameter
FIONBIO can be called with one value to turn it on, and another to turn it
off. Go see the documentation for full details.]
Alun.
~~~~
[Please don't email posters, if a Usenet response is appropriate.]
--
Texas Imperial Software | Find us at http://www.wftpd.com or email
Cedar Park TX 78613-1419 | WFTPD, WFTPD Pro are Windows FTP servers.
Fax/Voice +1(512)258-9858 | Try our NEW client software, WFTPD Explorer.