summaryrefslogtreecommitdiff
path: root/cpp/src/IceSSL/TransceiverI.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2007-05-23 12:49:48 +0000
committerBenoit Foucher <benoit@zeroc.com>2007-05-23 12:49:48 +0000
commit4f11b3b9bc858d7a5a8741fcb06ca61ce8189d6c (patch)
tree3fa912fd7db2b611fb76a8f7bc9547c39737b024 /cpp/src/IceSSL/TransceiverI.cpp
parentFixed VS8 compilation error (diff)
downloadice-4f11b3b9bc858d7a5a8741fcb06ca61ce8189d6c.tar.bz2
ice-4f11b3b9bc858d7a5a8741fcb06ca61ce8189d6c.tar.xz
ice-4f11b3b9bc858d7a5a8741fcb06ca61ce8189d6c.zip
Added Ice.TCP.SndSize/Ice.TCP.RcvSize properties, fixed throughput issue on
Win32.
Diffstat (limited to 'cpp/src/IceSSL/TransceiverI.cpp')
-rw-r--r--cpp/src/IceSSL/TransceiverI.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/cpp/src/IceSSL/TransceiverI.cpp b/cpp/src/IceSSL/TransceiverI.cpp
index 7f51ac52c76..705f02e2071 100644
--- a/cpp/src/IceSSL/TransceiverI.cpp
+++ b/cpp/src/IceSSL/TransceiverI.cpp
@@ -87,9 +87,9 @@ IceSSL::TransceiverI::write(IceInternal::Buffer& buf, int timeout)
//
// Limit packet size to avoid performance problems on WIN32
//
- if(_isPeerLocal && packetSize > 64 * 1024)
+ if(packetSize > _maxPacketSize)
{
- packetSize = 64 * 1024;
+ packetSize = _maxPacketSize;
}
#endif
@@ -541,10 +541,19 @@ IceSSL::TransceiverI::TransceiverI(const InstancePtr& instance, SSL* ssl, SOCKET
_adapterName(adapterName),
_incoming(incoming),
_desc(IceInternal::fdToString(fd))
+{
#ifdef _WIN32
- , _isPeerLocal(IceInternal::isPeerLocal(fd))
+ //
+ // On Windows, limiting the buffer size is important to prevent
+ // poor throughput performances when transfering large amount of
+ // data. See Microsoft KB article KB823764.
+ //
+ _maxPacketSize = IceInternal::getSendBufferSize(_fd) / 2;
+ if(_maxPacketSize < 512)
+ {
+ _maxPacketSize = 0;
+ }
#endif
-{
}
IceSSL::TransceiverI::~TransceiverI()