diff options
author | Benoit Foucher <benoit@zeroc.com> | 2006-02-17 18:42:11 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2006-02-17 18:42:11 +0000 |
commit | 79cc3d6fa6e29caa2179acba25359b0fee92a95a (patch) | |
tree | 8bb20bc01844725f67f4740b6666d4cbf3a766d4 /cppe/src | |
parent | Clear the WSASelect on the socket (diff) | |
download | ice-79cc3d6fa6e29caa2179acba25359b0fee92a95a.tar.bz2 ice-79cc3d6fa6e29caa2179acba25359b0fee92a95a.tar.xz ice-79cc3d6fa6e29caa2179acba25359b0fee92a95a.zip |
Fix
Diffstat (limited to 'cppe/src')
-rw-r--r-- | cppe/src/TcpTransport/Transceiver.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/cppe/src/TcpTransport/Transceiver.cpp b/cppe/src/TcpTransport/Transceiver.cpp index 612baa50873..ee8a61f4744 100644 --- a/cppe/src/TcpTransport/Transceiver.cpp +++ b/cppe/src/TcpTransport/Transceiver.cpp @@ -110,10 +110,13 @@ IceInternal::Transceiver::write(Buffer& buf, int timeout) while(buf.i != buf.b.end()) { -#ifndef ICEE_USE_SOCKET_TIMEOUT -// doSelect(false, timeout); -#else +#if defined(ICEE_USE_SOCKET_TIMEOUT) setTimeout(_fd, false, timeout); +#elif !defined(_WIN32) + if(timeout > 0) + { + doSelect(false, timeout); + } #endif repeatSend: @@ -140,18 +143,18 @@ IceInternal::Transceiver::write(Buffer& buf, int timeout) goto repeatSend; } -#ifdef ICEE_USE_SOCKET_TIMEOUT +#if defined(ICEE_USE_SOCKET_TIMEOUT) if(wouldBlock()) { throw TimeoutException(__FILE__, __LINE__); } -#endif - +#elif defined(_WIN32) if(wouldBlock()) { doSelect(false, timeout); continue; } +#endif if(connectionLost()) { |