Commit 1024f1b7 authored by Hobnob's avatar Hobnob

forgot listen, heh

parent 03c601d9
......@@ -75,6 +75,14 @@ void DoSocket()
}
freeaddrinfo(result);
if (listen(ListenSocket, SOMAXCONN) == SOCKET_ERROR)
{
printf("listen error: %ld\n", WSAGetLastError());
closesocket(ListenSocket);
WSACleanup();
return;
}
SOCKET ClientSocket = INVALID_SOCKET;
ClientSocket = accept(ListenSocket, NULL, NULL);
if (ClientSocket == INVALID_SOCKET)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment