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);
}
Aggregations