title: Mixing File Handles and Sockets in Winsock
body: <p>I'm porting some code from BSD sockets to Winsock, and I'm not sure how to handle the case below.</p>
  
  <p>My original application runs a select on both stdin and the network socket:</p>
  
  <pre><code>FD_SET(sock, &amp;fd);
  FD_SET(0, &amp;fd);
  ...
  if (select(..., &amp;fd, ... )...)
  </code></pre>
  
  <p>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.</p>
  
  <p>Is there an easy way to port this test to Windows sockets?</p>