diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2014-08-14 13:04:47 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2014-08-14 13:04:47 -0230 |
commit | f8823de7d38108d3fa5893b68ad6e6ae4811512c (patch) | |
tree | deb0f1e8f1f8fc2bb6b6b268f5048a8c27acb9bf /cpp/src/Ice/Network.cpp | |
parent | ICE-5370 Remove IceXML header from public headers (diff) | |
download | ice-f8823de7d38108d3fa5893b68ad6e6ae4811512c.tar.bz2 ice-f8823de7d38108d3fa5893b68ad6e6ae4811512c.tar.xz ice-f8823de7d38108d3fa5893b68ad6e6ae4811512c.zip |
Changed check for TCP fast path to not rely on WIN32_WINNRT
Diffstat (limited to 'cpp/src/Ice/Network.cpp')
-rw-r--r-- | cpp/src/Ice/Network.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp index 336446d7571..4a143e83618 100644 --- a/cpp/src/Ice/Network.cpp +++ b/cpp/src/Ice/Network.cpp @@ -58,10 +58,7 @@ extern "C" #endif #if defined(_WIN32) && !defined(ICE_OS_WINRT) -# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x602) -# include <mstcpip.h> -# define HAS_LOOPBACK_FAST_PATH 1 -# endif +# define HAS_LOOPBACK_FAST_PATH 1 #endif using namespace std; @@ -152,6 +149,10 @@ setKeepAlive(SOCKET fd) void setTcpLoopbackFastPath(SOCKET fd) { + // We define SIO_LOOPBACK_FAST_PATH ourselves rather than get it from mstcpip.h since + // code needs to compile on platforms that do not support this feature. On those platforms + // the WSAIoctl call will just return WSAEOPNOTSUPP. + const int SIO_LOOPBACK_FAST_PATH = (-1744830448); int OptionValue = 1; DWORD NumberOfBytesReturned = 0; int status = |