use of io.netty.handler.codec.spdy.SpdySessionHandler in project netty by netty.
the class SpdyOrHttpHandler method configureSpdy.
private static void configureSpdy(ChannelHandlerContext ctx, SpdyVersion version) throws Exception {
ChannelPipeline p = ctx.pipeline();
p.addLast(new SpdyFrameCodec(version));
p.addLast(new SpdySessionHandler(version, true));
p.addLast(new SpdyHttpEncoder(version));
p.addLast(new SpdyHttpDecoder(version, MAX_CONTENT_LENGTH));
p.addLast(new SpdyHttpResponseStreamIdHandler());
p.addLast(new SpdyServerHandler());
}
use of io.netty.handler.codec.spdy.SpdySessionHandler in project netty by netty.
the class SpdyClientInitializer method initChannel.
@Override
public void initChannel(SocketChannel ch) {
ChannelPipeline pipeline = ch.pipeline();
pipeline.addLast("ssl", sslCtx.newHandler(ch.alloc()));
pipeline.addLast("spdyFrameCodec", new SpdyFrameCodec(SPDY_3_1));
pipeline.addLast("spdyFrameLogger", new SpdyFrameLogger(INFO));
pipeline.addLast("spdySessionHandler", new SpdySessionHandler(SPDY_3_1, false));
pipeline.addLast("spdyHttpEncoder", new SpdyHttpEncoder(SPDY_3_1));
pipeline.addLast("spdyHttpDecoder", new SpdyHttpDecoder(SPDY_3_1, MAX_SPDY_CONTENT_LENGTH));
pipeline.addLast("spdyStreamIdHandler", new SpdyClientStreamIdHandler());
pipeline.addLast("httpHandler", httpResponseHandler);
}
Aggregations