Search in sources :

Example 41 with SslHandler

use of io.netty.handler.ssl.SslHandler in project async-http-client by AsyncHttpClient.

the class ChannelManager method createSslHandler.

private SslHandler createSslHandler(String peerHost, int peerPort) {
    SSLEngine sslEngine = sslEngineFactory.newSslEngine(config, peerHost, peerPort);
    SslHandler sslHandler = new SslHandler(sslEngine);
    if (handshakeTimeout > 0)
        sslHandler.setHandshakeTimeoutMillis(handshakeTimeout);
    return sslHandler;
}
Also used : SSLEngine(javax.net.ssl.SSLEngine) SslHandler(io.netty.handler.ssl.SslHandler)

Aggregations

SslHandler (io.netty.handler.ssl.SslHandler)41 SSLEngine (javax.net.ssl.SSLEngine)19 ChannelPipeline (io.netty.channel.ChannelPipeline)13 ChannelHandler (io.netty.channel.ChannelHandler)11 Channel (io.netty.channel.Channel)6 SocketChannel (io.netty.channel.socket.SocketChannel)6 ByteBuf (io.netty.buffer.ByteBuf)5 ChannelHandlerContext (io.netty.channel.ChannelHandlerContext)5 ChunkedWriteHandler (io.netty.handler.stream.ChunkedWriteHandler)5 IdleStateHandler (io.netty.handler.timeout.IdleStateHandler)5 ServerTlsHandler (io.grpc.netty.ProtocolNegotiators.ServerTlsHandler)4 Bootstrap (io.netty.bootstrap.Bootstrap)4 ServerBootstrap (io.netty.bootstrap.ServerBootstrap)4 NioEventLoopGroup (io.netty.channel.nio.NioEventLoopGroup)4 IOException (java.io.IOException)4 Test (org.junit.Test)4 ChannelFuture (io.netty.channel.ChannelFuture)3 ChannelInitializer (io.netty.channel.ChannelInitializer)3 NioServerSocketChannel (io.netty.channel.socket.nio.NioServerSocketChannel)3 NioSocketChannel (io.netty.channel.socket.nio.NioSocketChannel)3