Select
From PortaWiki
- select returns SOCKET_ERROR on error. This is different than POSIX like systems, which return -1 on error.
- select also needs exceptfds to trap exceptions such as could not connect (e.g. on nonblocking sockets). Unlike Linux (at least), read/writefds isn't enough.
- Calling select with no sockets, but with a timeout does *not* sleep for the timeout period. This is unlike *nix systems which will in that case sleep for the timeout period. This can lead to busy loops on Win32 around a select() call.