throw _exception;
}
Protocol protocol = _endpoint.getProtocol();
if(protocol == Protocol.TCP || (createPlainWhenUnknown && protocol == Protocol.UNKNOWN))
{
_delegate = new AsyncHttpConnection(TcpAndSslSelectChannelConnector.this, _endpoint, getServer());
return true;
}
else if(protocol == Protocol.SSL)
{
SocketChannel channel = _endpoint.getSocketChannel();
SSLEngine engine = createSSLEngine(channel);
SslConnection connection = new SslConnection(engine, _endpoint);
AsyncConnection delegate = new AsyncHttpConnection(TcpAndSslSelectChannelConnector.this,
connection.getSslEndPoint(),
getServer());
connection.getSslEndPoint().setConnection(delegate);
connection.setAllowRenegotiate(_sslContextFactory.isAllowRenegotiate());