Search in sources :

Example 1 with Socks4ClientDecoder

use of io.netty.handler.codec.socksx.v4.Socks4ClientDecoder in project netty by netty.

the class Socks4ProxyHandler method addCodec.

@Override
protected void addCodec(ChannelHandlerContext ctx) throws Exception {
    ChannelPipeline p = ctx.pipeline();
    String name = ctx.name();
    Socks4ClientDecoder decoder = new Socks4ClientDecoder();
    p.addBefore(name, null, decoder);
    decoderName = p.context(decoder).name();
    encoderName = decoderName + ".encoder";
    p.addBefore(name, encoderName, Socks4ClientEncoder.INSTANCE);
}
Also used : Socks4ClientDecoder(io.netty.handler.codec.socksx.v4.Socks4ClientDecoder) ChannelPipeline(io.netty.channel.ChannelPipeline)

Aggregations

ChannelPipeline (io.netty.channel.ChannelPipeline)1 Socks4ClientDecoder (io.netty.handler.codec.socksx.v4.Socks4ClientDecoder)1