mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Fixed non-blocking connection with a sf::TcpSocket on Windows
This commit is contained in:
parent
0db73b6a4c
commit
76b67fcd1c
@ -74,11 +74,13 @@ Socket::Status SocketImpl::getErrorStatus()
|
||||
switch (WSAGetLastError())
|
||||
{
|
||||
case WSAEWOULDBLOCK : return Socket::NotReady;
|
||||
case WSAEALREADY : return Socket::NotReady;
|
||||
case WSAECONNABORTED : return Socket::Disconnected;
|
||||
case WSAECONNRESET : return Socket::Disconnected;
|
||||
case WSAETIMEDOUT : return Socket::Disconnected;
|
||||
case WSAENETRESET : return Socket::Disconnected;
|
||||
case WSAENOTCONN : return Socket::Disconnected;
|
||||
case WSAEISCONN : return Socket::Done; // when connecting a non-blocking socket
|
||||
default : return Socket::Error;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user