On unix everything is a file approach of function read()
, write()
, close()
is not supported on Win32.
I
I suspect... but I am not sure, that fds and sockets on Windows use separate namespaces. Therefore the number for a socket and a file could be the same, and it is impossible to know which one you are talking about when you call is_net_socket
.
Try printing out socket and fd numbers to see if they are ever the same as each other at the same time.