http://bugs.winehq.org/show_bug.cgi?id=9787
--- Comment #215 from Scott Lindeneau slindeneau@gmail.com 2008-07-11 11:35:50 --- (In reply to comment #213) We agree for parts one and two good!
Windows don't do this (NT kernel is fully asynchronous already); Wine don't have to do this (asynchronous accept is available with POSIX sockets). I tried to use these facilities, and here is main problem I faced with: wineserver socket implementation is complicated and is tightly integrated with asynchronous i/o part; latest patch posted here is faulty, and even with latest changes I observed missed connections (Apache2 for Windows is quite good for testing reliability). Maybe distinct listener thread would be easier to implement AcceptEx properly, I don't know.
a) The wineserver itself is an asynchronous kernel. b) I have noticed the missed connections too. c) I think the wineserver is required to make a distinct listener thread to implement acceptex properly. The POSIX sockets cannot, and the exsiting wineserver socket implementation cannot, properly set the flags.
AcceptEx also gives you ability to "assign" socket to be used for new connection, and more importantly AFAIK there is no async accept support in wineserver at the moment.
Didn't think about the assigned socket thing. I think a correct acceptex implementation requires a distinct listener thread operated by the wineserver implemented in the form of an asynchronous accept function. Maybe not, but I think thats the whole point of the acceptex function in the first place.