Use INVALID_SOCKET instead of -1