summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Network.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2016-10-20 16:45:10 -0700
committerMark Spruiell <mes@zeroc.com>2016-10-20 16:45:10 -0700
commitedc4c248688d5e4a58be443aa95aab4226991c5d (patch)
tree60f6a8cb5917a7f325a30ea2ff824d5b748f553b /cpp/src/Ice/Network.cpp
parentFix to allow run es5 test in Windows (diff)
downloadice-edc4c248688d5e4a58be443aa95aab4226991c5d.tar.bz2
ice-edc4c248688d5e4a58be443aa95aab4226991c5d.tar.xz
ice-edc4c248688d5e4a58be443aa95aab4226991c5d.zip
updating IceBT to BlueZ 5
Diffstat (limited to 'cpp/src/Ice/Network.cpp')
-rwxr-xr-xcpp/src/Ice/Network.cpp25
1 files changed, 23 insertions, 2 deletions
diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp
index d46e3ab195f..2620a8a34be 100755
--- a/cpp/src/Ice/Network.cpp
+++ b/cpp/src/Ice/Network.cpp
@@ -928,6 +928,27 @@ IceInternal::NativeInfo::checkIfErrorOrCompleted(SocketOperation op, IAsyncInfo^
}
}
+#else
+
+void
+IceInternal::NativeInfo::setNewFd(SOCKET fd)
+{
+ assert(_fd == INVALID_SOCKET); // This can only be called once, when the current socket isn't set yet.
+ _newFd = fd;
+}
+
+bool
+IceInternal::NativeInfo::newFd()
+{
+ if(_newFd == INVALID_SOCKET)
+ {
+ return false;
+ }
+ assert(_fd == INVALID_SOCKET);
+ swap(_fd, _newFd);
+ return true;
+}
+
#endif
bool
@@ -1371,10 +1392,10 @@ IceInternal::closeSocket(SOCKET fd)
WSASetLastError(error);
#else
int error = errno;
-
+
# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
//
- // FreeBSD returns ECONNRESET if the underlying object was
+ // FreeBSD returns ECONNRESET if the underlying object was
// a stream socket that was shut down by the peer before all
// pending data was delivered.
//