Merge branch 'master' of https://github.com/DigitalPulseSoftware/NazaraEngine
This commit is contained in:
@@ -326,7 +326,7 @@ namespace Nz
|
||||
});
|
||||
}
|
||||
|
||||
while (totalByteSent < size)
|
||||
while (totalByteSent < size || !IsBlockingEnabled())
|
||||
{
|
||||
int sendSize = static_cast<int>(std::min<std::size_t>(size - totalByteSent, std::numeric_limits<int>::max())); //< Handle very large send
|
||||
int sentSize;
|
||||
|
||||
@@ -135,6 +135,30 @@ namespace Nz
|
||||
|
||||
#if NAZARA_NETWORK_POLL_SUPPORT
|
||||
activeSockets = SocketImpl::Poll(m_sockets.data(), m_sockets.size(), static_cast<int>(msTimeout), error);
|
||||
|
||||
m_readyToReadSockets.clear();
|
||||
m_readyToWriteSockets.clear();
|
||||
if (activeSockets > 0U)
|
||||
{
|
||||
int socketRemaining = activeSockets;
|
||||
for (PollSocket& entry : m_sockets)
|
||||
{
|
||||
if (entry.revents != 0)
|
||||
{
|
||||
if (entry.revents & POLLRDNORM)
|
||||
m_readyToReadSockets.insert(entry.fd);
|
||||
|
||||
if (entry.revents & POLLWRNORM)
|
||||
m_readyToWriteSockets.insert(entry.fd);
|
||||
|
||||
entry.revents = 0;
|
||||
|
||||
if (--socketRemaining == 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
fd_set* readSet = nullptr;
|
||||
fd_set* writeSet = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user