diff options
author | Marc Laukien <marc@zeroc.com> | 2004-10-25 22:26:08 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2004-10-25 22:26:08 +0000 |
commit | 32775e740627ff289197dab5e457734c4c0847ba (patch) | |
tree | 157ebb09a7b66772858cb5505dcd483316567b03 /cpp/src/IceSSL/SslTransceiver.cpp | |
parent | using Make.rules instead of distutils (diff) | |
download | ice-32775e740627ff289197dab5e457734c4c0847ba.tar.bz2 ice-32775e740627ff289197dab5e457734c4c0847ba.tar.xz ice-32775e740627ff289197dab5e457734c4c0847ba.zip |
started with thread per client
Diffstat (limited to 'cpp/src/IceSSL/SslTransceiver.cpp')
-rw-r--r-- | cpp/src/IceSSL/SslTransceiver.cpp | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/cpp/src/IceSSL/SslTransceiver.cpp b/cpp/src/IceSSL/SslTransceiver.cpp index 4a8998823e1..f7c9e8260ac 100644 --- a/cpp/src/IceSSL/SslTransceiver.cpp +++ b/cpp/src/IceSSL/SslTransceiver.cpp @@ -92,12 +92,12 @@ IceSSL::SslTransceiver::close() } void -IceSSL::SslTransceiver::shutdown() +IceSSL::SslTransceiver::shutdownWrite() { if(_traceLevels->network >= 2) { Trace out(_logger, _traceLevels->networkCat); - out << "shutting down ssl connection\n" << toString(); + out << "shutting down ssl connection for writing\n" << toString(); } int shutdown = 0; @@ -111,7 +111,30 @@ IceSSL::SslTransceiver::shutdown() while((shutdown == 0) && (retries < 0)); assert(_fd != INVALID_SOCKET); - shutdownSocket(_fd); + shutdownSocketWrite(_fd); +} + +void +IceSSL::SslTransceiver::shutdownReadWrite() +{ + if(_traceLevels->network >= 2) + { + Trace out(_logger, _traceLevels->networkCat); + out << "shutting down ssl connection for reading and writing\n" << toString(); + } + + int shutdown = 0; + int numRetries = 100; + int retries = -numRetries; + do + { + shutdown = internalShutdown(); + retries++; + } + while((shutdown == 0) && (retries < 0)); + + assert(_fd != INVALID_SOCKET); + shutdownSocketReadWrite(_fd); } void @@ -497,7 +520,7 @@ IceSSL::SslTransceiver::internalShutdown(int timeout) if(retCode == 1) { // Shutdown successful - shut down the socket for writing. - shutdownSocket(SSL_get_fd(_sslConnection)); + shutdownSocketWrite(SSL_get_fd(_sslConnection)); } else if(retCode == -1) { |