127b123c2c
On win32 socket() returns INVALID_SOCKET, which is unsigned, on error, not -1. Also, most network functions return SOCKET_ERROR. This patch tries to make the usage consistent. (cherry picked from commit f384e54fc68802d5e95688ea02e15d1e85f0b7ea)