WSAPoll() is supposed to be identical to BSD's poll() function, see http://blogs.msdn.com/wndp/archive/2006/10/26/WSAPoll.aspx and the MSDN docs. According to my test, it's not. It does not report failed connections!
Example: 1. Create a non-blocking socket. 2. Connect to a address&port with no listener. 3. Call WSAPoll() with any valid flags set in the events field (eg. POLLIN|POLLOUT but I've tried every bit set, except the invalid bits), and time out to -1.
WSAPoll will never return!
I've tried this on FreeBSD 7.0, Linux (CentOS 5.2), and OpenSolaris 2008.05. They all report failed connections. Here's the example code which fails (blocks in WSAPoll) on Windows Vista SP1:
"Windows 8 Bugs 309411 - WSAPoll does not report failed connections
8/3/2011 6:53 PM Resolved as Won't Fix by muraris
Has been like this forever and people are already used to it."
"The recommendation for now is to not use the WSAPoll function it in case you encounter this issue, but rather the other Net-API functions."