diff options
Diffstat (limited to 'src/network/network_content.cpp')
-rw-r--r-- | src/network/network_content.cpp | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/network/network_content.cpp b/src/network/network_content.cpp index 95d0966c8..680dbfb98 100644 --- a/src/network/network_content.cpp +++ b/src/network/network_content.cpp @@ -737,27 +737,11 @@ void ClientNetworkContentSocketHandler::SendReceive() return; } - fd_set read_fd, write_fd; - struct timeval tv; - - FD_ZERO(&read_fd); - FD_ZERO(&write_fd); - - FD_SET(this->sock, &read_fd); - FD_SET(this->sock, &write_fd); - - tv.tv_sec = tv.tv_usec = 0; // don't block at all. -#if !defined(__MORPHOS__) && !defined(__AMIGA__) - select(FD_SETSIZE, &read_fd, &write_fd, NULL, &tv); -#else - WaitSelect(FD_SETSIZE, &read_fd, &write_fd, NULL, &tv, NULL); -#endif - if (FD_ISSET(this->sock, &read_fd)) { + if (this->CanSendReceive()) { this->Recv_Packets(); this->lastActivity = _realtime_tick; } - this->writable = !!FD_ISSET(this->sock, &write_fd); this->Send_Packets(); } |