summaryrefslogtreecommitdiff
path: root/cppe/src/IceE/Network.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2006-02-17 18:14:44 +0000
committerBenoit Foucher <benoit@zeroc.com>2006-02-17 18:14:44 +0000
commit23c651a0483a94109013695d52ae20441abd14d9 (patch)
tree330848e8c10946f49ac27719bbb77ab3fafdb9c7 /cppe/src/IceE/Network.cpp
parentChanges for Windows and blockign sockets. (diff)
downloadice-23c651a0483a94109013695d52ae20441abd14d9.tar.bz2
ice-23c651a0483a94109013695d52ae20441abd14d9.tar.xz
ice-23c651a0483a94109013695d52ae20441abd14d9.zip
Clear the WSASelect on the socket
Diffstat (limited to 'cppe/src/IceE/Network.cpp')
-rw-r--r--cppe/src/IceE/Network.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/cppe/src/IceE/Network.cpp b/cppe/src/IceE/Network.cpp
index b7448fa4843..30e38f80adf 100644
--- a/cppe/src/IceE/Network.cpp
+++ b/cppe/src/IceE/Network.cpp
@@ -510,6 +510,23 @@ repeatConnect:
throw ex;
}
+#ifdef ICEE_USE_SOCKET_TIMEOUT
+ //
+ // This is necessary to be able to set the socket in blocking mode.
+ //
+ if(WSAEventSelect(fd, event, 0) == SOCKET_ERROR)
+ {
+ int error = WSAGetLastError();
+
+ WSACloseEvent(event);
+ closeSocketNoThrow(fd);
+
+ SocketException ex(__FILE__, __LINE__);
+ ex.error = error;
+ throw ex;
+ }
+#endif
+
//
// Now we close the event, because we're finished and
// this code be repeated.