Use WSAGetLastError() on windows