Examples of cmdType()


Examples of io.netty.handler.codec.socks.SocksCmdRequest.cmdType()

                ctx.pipeline().addFirst(SocksCmdRequestDecoder.getName(), new SocksCmdRequestDecoder());
                ctx.write(new SocksAuthResponse(SocksAuthStatus.SUCCESS));
                break;
            case CMD:
                SocksCmdRequest req = (SocksCmdRequest) socksRequest;
                if (req.cmdType() == SocksCmdType.CONNECT) {
                    ctx.pipeline().addLast(SocksServerConnectHandler.getName(), new SocksServerConnectHandler());
                    ctx.pipeline().remove(this);
                    ctx.nextInboundMessageBuffer().add(socksRequest);
                    ctx.fireInboundBufferUpdated();
                } else {
View Full Code Here

Examples of io.netty.handler.codec.socks.SocksCmdRequest.cmdType()

                ctx.pipeline().addFirst(new SocksCmdRequestDecoder());
                ctx.write(new SocksAuthResponse(SocksAuthStatus.SUCCESS));
                break;
            case CMD:
                SocksCmdRequest req = (SocksCmdRequest) socksRequest;
                if (req.cmdType() == SocksCmdType.CONNECT) {
                    ctx.pipeline().addLast(new SocksServerConnectHandler());
                    ctx.pipeline().remove(this);
                    ctx.fireChannelRead(socksRequest);
                } else {
                    ctx.close();
View Full Code Here

Examples of io.netty.handler.codec.socksx.v4.Socks4CmdRequest.cmdType()

    @Override
    public void messageReceived(ChannelHandlerContext ctx, SocksRequest socksRequest) throws Exception {
        switch (socksRequest.protocolVersion()) {
            case SOCKS4a:
                Socks4CmdRequest socksV4CmdRequest = (Socks4CmdRequest) socksRequest;
                if (socksV4CmdRequest.cmdType() == Socks4CmdType.CONNECT) {
                    ctx.pipeline().addLast(new SocksServerConnectHandler());
                    ctx.pipeline().remove(this);
                    ctx.fireChannelRead(socksRequest);
                } else {
                    ctx.close();
View Full Code Here

Examples of io.netty.handler.codec.socksx.v5.Socks5CmdRequest.cmdType()

                        ctx.pipeline().addFirst(new Socks5CmdRequestDecoder());
                        ctx.write(new Socks5AuthResponse(Socks5AuthStatus.SUCCESS));
                        break;
                    case CMD:
                        Socks5CmdRequest socks5CmdRequest = (Socks5CmdRequest) socksRequest;
                        if (socks5CmdRequest.cmdType() == Socks5CmdType.CONNECT) {
                            ctx.pipeline().addLast(new SocksServerConnectHandler());
                            ctx.pipeline().remove(this);
                            ctx.fireChannelRead(socksRequest);
                        } else {
                            ctx.close();
View Full Code Here

Examples of io.netty.handler.codec.socksx.v5.Socks5CmdRequest.cmdType()

                authenticated = authenticate(ctx, msg);
                return false;
            }

            Socks5CmdRequest req = (Socks5CmdRequest) msg;
            assertThat(req.cmdType(), is(Socks5CmdType.CONNECT));

            Socks5CmdResponse res;
            res = new Socks5CmdResponse(Socks5CmdStatus.SUCCESS, Socks5AddressType.IPv4);
            intermediaryDestination = new InetSocketAddress(req.host(), req.port());
View Full Code Here

Examples of io.netty.handler.codec.socksx.v5.Socks5CmdRequest.cmdType()

                authenticated = authenticate(ctx, msg);
                return false;
            }

            Socks5CmdRequest req = (Socks5CmdRequest) msg;
            assertThat(req.cmdType(), is(Socks5CmdType.CONNECT));

            ctx.pipeline().addBefore(ctx.name(), "lineDecoder", new LineBasedFrameDecoder(64, false, true));

            Socks5CmdResponse res;
            boolean sendGreeting = false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.