Example usage for io.netty.handler.codec.socks SocksInitRequest SocksInitRequest

List of usage examples for io.netty.handler.codec.socks SocksInitRequest SocksInitRequest

Introduction

In this page you can find the example usage for io.netty.handler.codec.socks SocksInitRequest SocksInitRequest.

Prototype

public SocksInitRequest(List<SocksAuthScheme> authSchemes) 

Source Link

Usage

From source file:com.xx_dev.apn.socks.test.SocksClientHandler.java

License:Apache License

@Override
public void channelActive(ChannelHandlerContext ctx) throws Exception {
    super.channelActive(ctx);
    ctx.writeAndFlush(new SocksInitRequest(new ArrayList<SocksAuthScheme>(0)));
}

From source file:org.msgpack.rpc.extension.socks.SocksProxyHandler.java

License:Open Source License

@Override
public void channelActive(ChannelHandlerContext ctx) throws Exception {
    List<SocksAuthScheme> lstAuth = new ArrayList<>();
    lstAuth.add(SocksAuthScheme.NO_AUTH);
    SocksInitRequest si = new SocksInitRequest(lstAuth);
    ctx.writeAndFlush(si);/*from  w w  w  .  ja  va  2s  .  com*/
}