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:
Jérôme Leclercq
2018-06-12 14:31:49 +02:00
parent 15f84dc712
commit 56b23a2f27
16 changed files with 120 additions and 94 deletions

View File

@@ -60,7 +60,7 @@ namespace Nz
static IpAddress QuerySocketAddress(SocketHandle handle, SocketError* error = nullptr);
static std::size_t QuerySendBufferSize(SocketHandle handle, SocketError* error = nullptr);
static int Poll(PollSocket* fdarray, std::size_t nfds, int timeout, SocketError* error);
static unsigned int Poll(PollSocket* fdarray, std::size_t nfds, int timeout, SocketError* error);
static bool Receive(SocketHandle handle, void* buffer, int length, int* read, SocketError* error);
static bool ReceiveFrom(SocketHandle handle, void* buffer, int length, IpAddress* from, int* read, SocketError* error);