Switched INVALID_SOCKET to SOCKET_ERROR