I'm porting some code from BSD sockets to Winsock, and I'm not sure how to handle the case below.
My original application runs a select on both stdin and the network socket:
FD_SET(sock, &fd);
FD_SET(0, &fd);
...
if (select(..., &fd, ... )...)
Trying to run this in Winsock gives an error 10038 (WSAENOTSOCK), which makes sense, since what was file handle 0 in Linux (stdin) is not a socket (more precisely: a SOCKET type) in Windows.
Is there an easy way to port this test to Windows sockets?