_logger.debug("Applied connection ssl option override, setting UseSsl to: " + connUseSsl );
}
}
}
SecurityLayer securityLayer = SecurityLayerFactory.newInstance(settings);
OutgoingNetworkTransport transport = Transport.getOutgoingTransportInstance(getProtocolVersion());
NetworkConnection network = transport.connect(settings, securityLayer.receiver(_conn.getProtocolHandler()),
_conn.getProtocolHandler());
_conn.getProtocolHandler().setNetworkConnection(network, securityLayer.sender(network.getSender()));
StateWaiter waiter = _conn.getProtocolHandler().createWaiter(openOrClosedStates);
_conn.getProtocolHandler().getProtocolSession().init(settings);
// this blocks until the connection has been set up or when an error
// has prevented the connection being set up