in reply to Re^4: [Win32] IO::Select's can_read method
in thread [Win32] IO::Select's can_read method
Cygwin deals with the problem by buffering the data. Attempt to do a non-blocking read, do the async IO for the number of bytes the read wanted, if more than X ms passes without a async response (event obj, APC, or IOCP), declare the read failed with EWOULDBLOCK. Until the read completes, every read will fail with EWOULDBLOCK. Its very simple, simply buffer the data internally.
Select is not that hard to make file aware, you just have to multiplex the async file kernel event objects with the winsock handles. I think winsock handles can goto waitformultiple unmodified unless this is DOS Windows.