diff options
Diffstat (limited to 'cpp/src/IceSSL/OpenSSLTransceiverI.cpp')
-rw-r--r-- | cpp/src/IceSSL/OpenSSLTransceiverI.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/cpp/src/IceSSL/OpenSSLTransceiverI.cpp b/cpp/src/IceSSL/OpenSSLTransceiverI.cpp index 5c5a7390586..6fcffc8b3e8 100644 --- a/cpp/src/IceSSL/OpenSSLTransceiverI.cpp +++ b/cpp/src/IceSSL/OpenSSLTransceiverI.cpp @@ -95,16 +95,6 @@ OpenSSL::TransceiverI::initialize(IceInternal::Buffer& readBuffer, IceInternal:: { SOCKET fd = _delegate->getNativeInfo()->fd(); BIO* bio = 0; - #ifdef ICE_USE_IOCP - _maxSendPacketSize = std::max(512, IceInternal::getSendBufferSize(fd)); - _maxRecvPacketSize = std::max(512, IceInternal::getRecvBufferSize(fd)); - _sentBytes = 0; - if(!BIO_new_bio_pair(&bio, _maxSendPacketSize, &_memBio, _maxRecvPacketSize)) - { - bio = 0; - _memBio = 0; - } -#else if(fd == INVALID_SOCKET) { assert(_sentBytes == 0); @@ -118,12 +108,22 @@ OpenSSL::TransceiverI::initialize(IceInternal::Buffer& readBuffer, IceInternal:: } else { + #ifdef ICE_USE_IOCP + _maxSendPacketSize = std::max(512, IceInternal::getSendBufferSize(fd)); + _maxRecvPacketSize = std::max(512, IceInternal::getRecvBufferSize(fd)); + _sentBytes = 0; + if(!BIO_new_bio_pair(&bio, _maxSendPacketSize, &_memBio, _maxRecvPacketSize)) + { + bio = 0; + _memBio = 0; + } +#else // // This static_cast is necessary due to 64bit windows. There SOCKET is a non-int type. // bio = BIO_new_socket(static_cast<int>(fd), 0); - } #endif + } if(!bio) { |