Search in sources :

Example 1 with HttpSnoopServerHandler

use of io.netty.example.http.snoop.HttpSnoopServerHandler in project netty by netty.

the class PortUnificationServerHandler method switchToHttp.

private void switchToHttp(ChannelHandlerContext ctx) {
    ChannelPipeline p = ctx.pipeline();
    p.addLast("decoder", new HttpRequestDecoder());
    p.addLast("encoder", new HttpResponseEncoder());
    p.addLast("deflater", new HttpContentCompressor());
    p.addLast("handler", new HttpSnoopServerHandler());
    p.remove(this);
}
Also used : HttpResponseEncoder(io.netty.handler.codec.http.HttpResponseEncoder) HttpRequestDecoder(io.netty.handler.codec.http.HttpRequestDecoder) HttpContentCompressor(io.netty.handler.codec.http.HttpContentCompressor) HttpSnoopServerHandler(io.netty.example.http.snoop.HttpSnoopServerHandler) ChannelPipeline(io.netty.channel.ChannelPipeline)

Aggregations

ChannelPipeline (io.netty.channel.ChannelPipeline)1 HttpSnoopServerHandler (io.netty.example.http.snoop.HttpSnoopServerHandler)1 HttpContentCompressor (io.netty.handler.codec.http.HttpContentCompressor)1 HttpRequestDecoder (io.netty.handler.codec.http.HttpRequestDecoder)1 HttpResponseEncoder (io.netty.handler.codec.http.HttpResponseEncoder)1