Package io.netty.handler.codec.socksx.v4

Examples of io.netty.handler.codec.socksx.v4.Socks4CmdResponse


    @Override
    protected void addCodec(ChannelHandlerContext ctx) throws Exception {
        ChannelPipeline p = ctx.pipeline();
        String name = ctx.name();

        Socks4CmdResponseDecoder decoder = new Socks4CmdResponseDecoder();
        p.addBefore(name, null, decoder);

        decoderName = p.context(decoder).name();
        encoderName = decoderName + ".encoder";
View Full Code Here


    }

    @Override
    protected boolean handleResponse(ChannelHandlerContext ctx, Object response) throws Exception {
        final Socks4CmdResponse res = (Socks4CmdResponse) response;
        final Socks4CmdStatus status = res.cmdStatus();
        if (status == Socks4CmdStatus.SUCCESS) {
            return true;
        }

        throw new ProxyConnectException(exceptionMessage("cmdStatus: " + status));
View Full Code Here

TOP

Related Classes of io.netty.handler.codec.socksx.v4.Socks4CmdResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.