diff options
author | Benoit Foucher <benoit@zeroc.com> | 2005-06-30 09:44:39 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2005-06-30 09:44:39 +0000 |
commit | 34d41333b3b1e104a0796b15c687061ef4560b8e (patch) | |
tree | 352393e3f845e3633b735d1b7432356f7c8badd6 /cpp/src/Ice/TcpTransceiver.cpp | |
parent | Make install fixes (diff) | |
download | ice-34d41333b3b1e104a0796b15c687061ef4560b8e.tar.bz2 ice-34d41333b3b1e104a0796b15c687061ef4560b8e.tar.xz ice-34d41333b3b1e104a0796b15c687061ef4560b8e.zip |
Merged fix from branch (throughput performance issue on Win32)
Diffstat (limited to 'cpp/src/Ice/TcpTransceiver.cpp')
-rw-r--r-- | cpp/src/Ice/TcpTransceiver.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cpp/src/Ice/TcpTransceiver.cpp b/cpp/src/Ice/TcpTransceiver.cpp index bfe6cee14d0..6586aee2201 100644 --- a/cpp/src/Ice/TcpTransceiver.cpp +++ b/cpp/src/Ice/TcpTransceiver.cpp @@ -81,6 +81,16 @@ IceInternal::TcpTransceiver::write(Buffer& buf, int timeout) Buffer::Container::difference_type packetSize = static_cast<Buffer::Container::difference_type>(buf.b.end() - buf.i); +#ifdef _WIN32 + // + // Limit packet size to avoid performance problems on WIN32 + // + if(_isPeerLocal && packetSize > 64 * 1024) + { + packetSize = 64 * 1024; + } +#endif + while(buf.i != buf.b.end()) { assert(_fd != INVALID_SOCKET); @@ -322,6 +332,9 @@ IceInternal::TcpTransceiver::TcpTransceiver(const InstancePtr& instance, SOCKET _stats(instance->stats()), _fd(fd), _desc(fdToString(fd)) +#ifdef _WIN32 + , _isPeerLocal(isPeerLocal(fd)) +#endif { FD_ZERO(&_rFdSet); FD_ZERO(&_wFdSet); |