summaryrefslogtreecommitdiff
path: root/cppe/src
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2006-02-17 18:42:11 +0000
committerBenoit Foucher <benoit@zeroc.com>2006-02-17 18:42:11 +0000
commit79cc3d6fa6e29caa2179acba25359b0fee92a95a (patch)
tree8bb20bc01844725f67f4740b6666d4cbf3a766d4 /cppe/src
parentClear the WSASelect on the socket (diff)
downloadice-79cc3d6fa6e29caa2179acba25359b0fee92a95a.tar.bz2
ice-79cc3d6fa6e29caa2179acba25359b0fee92a95a.tar.xz
ice-79cc3d6fa6e29caa2179acba25359b0fee92a95a.zip
Fix
Diffstat (limited to 'cppe/src')
-rw-r--r--cppe/src/TcpTransport/Transceiver.cpp15
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())
{