Reply To: Slow performance on Windows Home Server RTM [svn-1676]

#12916
rpedde
Participant

@AHodsdon wrote:

Yep. It looks like that’s it. Msdn has this to say on WSAAsyncSelect (http://msdn2.microsoft.com/en-us/library/ms741540.aspx):

The WSAAsyncSelect function automatically sets socket s to nonblocking mode, regardless of the value of lEvent. To set socket s back to blocking mode, it is first necessary to clear the event record associated with socket s via a call to WSAAsyncSelect with lEvent set to zero. You can then call ioctlsocket or WSAIoctl to set the socket back to blocking mode. For more information about how to set the nonblocking socket back to blocking mode, see the ioctlsocket and WSAIoctl functions.

Hrm. So it’s broken, they know it, know how to fix it, but leave it to the programmer to do it. Why not just make it work the way everyone expects it to work? Clearly they recognize that’s not what people expect.

Lame.

And people accuse unix of being the poster-boy for the pc-losering problem. Not even close. Not only does win32 have baroque api’s, but they push complexity toward the programmer, not into the api. Ugh.

Grumble grumble windows suckage. But I thought as much, which is why I put the warning text in there. Dang it.