Network/SocketPoller: Wait() now returns the number of active sockets, and optionally the last error
It will also ignore the EINTR error on Linux
This commit is contained in:
@@ -78,6 +78,7 @@ namespace Nz
|
||||
SocketError_ConnectionRefused, //< The connection attempt was refused
|
||||
SocketError_DatagramSize, //< The datagram size is over the system limit
|
||||
SocketError_Internal, //< The error is coming from the engine
|
||||
SocketError_Interrupted, //< The operation was interrupted by a signal
|
||||
SocketError_Packet, //< The packet encoding/decoding failed, probably because of corrupted data
|
||||
SocketError_NetworkError, //< The network system has failed (maybe network is down)
|
||||
SocketError_NotInitialized, //< Nazara network has not been initialized
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Nz
|
||||
bool RegisterSocket(AbstractSocket& socket, SocketPollEventFlags eventFlags);
|
||||
void UnregisterSocket(AbstractSocket& socket);
|
||||
|
||||
bool Wait(int msTimeout);
|
||||
unsigned int Wait(int msTimeout, SocketError* error = nullptr);
|
||||
|
||||
SocketPoller& operator=(SocketPoller&&) noexcept = default;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user