WinSock select() does not support standard file descriptors, it can only check SOCKETs. The following function is an attempt to create a select() function with support for other handles.