public Channel getChannel() {
return channel;
}
public void setChannel(Channel channel) {
this.channel = channel;
}
public ClientBootstrap getBootstrap() {
return bootstrap;
}
public void setBootstrap(ClientBootstrap bootstrap) {
this.bootstrap = bootstrap;
}
public ChannelFuture getChannelFuture() {
return channelFuture;
}
public void setChannelFuture(ChannelFuture channelFuture) {
this.channelFuture = channelFuture;
}
public int start(String ip,int port) {
System.setProperty(“java.net.preferIPv4Stack”, “true”);
System.setProperty(“java.net.preferIPv6Addresses”, “false”);
bootstrap = new ClientBootstrap(new NioClientSocketChannelFactory(
Executors.newCachedThreadPool(),
Executors.newCachedThreadPool()));
bootstrap.setPipel