summaryrefslogtreecommitdiff
path: root/cpp/src/IceSSL/ConnectorI.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2009-08-21 15:55:01 +0200
committerBenoit Foucher <benoit@zeroc.com>2009-08-21 15:55:01 +0200
commitb9f2fa14fb3f222a6ec5e0a93bf25fe5ad12b56a (patch)
tree183215e2dbeadfbc871b800ce09726e58af38b91 /cpp/src/IceSSL/ConnectorI.cpp
parentadding compression cookbook demo (diff)
downloadice-b9f2fa14fb3f222a6ec5e0a93bf25fe5ad12b56a.tar.bz2
ice-b9f2fa14fb3f222a6ec5e0a93bf25fe5ad12b56a.tar.xz
ice-b9f2fa14fb3f222a6ec5e0a93bf25fe5ad12b56a.zip
IOCP changes, bug 3501, 4200, 4156, 3101
Diffstat (limited to 'cpp/src/IceSSL/ConnectorI.cpp')
-rw-r--r--cpp/src/IceSSL/ConnectorI.cpp31
1 files changed, 1 insertions, 30 deletions
diff --git a/cpp/src/IceSSL/ConnectorI.cpp b/cpp/src/IceSSL/ConnectorI.cpp
index aa034e66a18..9b5e14a6fe9 100644
--- a/cpp/src/IceSSL/ConnectorI.cpp
+++ b/cpp/src/IceSSL/ConnectorI.cpp
@@ -42,36 +42,7 @@ IceSSL::ConnectorI::connect()
try
{
- SOCKET fd = IceInternal::createSocket(false, _addr.ss_family);
- IceInternal::setBlock(fd, false);
- IceInternal::setTcpBufSize(fd, _instance->communicator()->getProperties(), _logger);
- bool connected = IceInternal::doConnect(fd, _addr);
-
- // This static_cast is necessary due to 64bit windows. There SOCKET is a non-int type.
- BIO* bio = BIO_new_socket(static_cast<int>(fd), BIO_CLOSE);
- if(!bio)
- {
- IceInternal::closeSocketNoThrow(fd);
- SecurityException ex(__FILE__, __LINE__);
- ex.reason = "openssl failure";
- throw ex;
- }
-
- SSL* ssl = SSL_new(_instance->context());
- if(!ssl)
- {
- BIO_free(bio); // Also closes the socket.
- SecurityException ex(__FILE__, __LINE__);
- ex.reason = "openssl failure";
- throw ex;
- }
- SSL_set_bio(ssl, bio, bio);
-
- //
- // SSL handshaking is performed in TransceiverI::initialize, since
- // connect must not block.
- //
- return new TransceiverI(_instance, ssl, fd, _host, connected, false);
+ return new TransceiverI(_instance, IceInternal::createSocket(false, _addr.ss_family), _host, _addr);
}
catch(const Ice::LocalException& ex)
{