
Hi Peter, Peter Dimov <pdimov@mmltd.net> wrote:
Christopher Kohlhoff wrote:
It's on my to-do list to implement true asynchronous connect using ConnectEx (on Windows XP, Window Server 2003 and later). When I find some time to do this, I will be able to eliminate this select_reactor use and the associated socket.
Probably a stupid question, but why not use WSAAsyncSelect/WSAEventSelect?
The WSAAsyncSelect function is part of the old Windows 3.1 socket interface and uses window messages for notification. I don't really want to go there :) I could use WSAEventSelect in conjunction with WaitForMultipleObjects. It does have a 64 handle limit, whereas select doesn't (FD_SETSIZE defaults to 64 but can be redefined), but that may not be a problem in practice. However, the main reason I'm using the select_reactor on Windows over a WFMO reactor is that it reuses code. And since ConnectEx is available on Windows XP, 2003, and all new versions moving forward, there doesn't seem so much reason to develop a WFMO reactor at this time. Cheers, Chris