Netty 4/5 说明: 目前 http://netty.io/ 发布的最新版本号4.1.30.Final,但是并没有netty5相关的版本发布了
Netty3 模拟多连接的客户端
package xss.netty.netty3.client;
import org.jboss.netty.bootstrap.ClientBootstrap;
import org.jboss.netty.channel.*;
import org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory;
import org.jboss.netty.handler.codec.string.StringDecoder;
import org.jboss.netty.handler.codec.string.StringEncoder;
import xss.netty.netty3.HelloClientHandler;
import java.net.InetSocketAddress;
import java.util.Vector;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicInteger;
/**
* 多个连接的客户端
*/
public class ClientMutliChannel {
//客户端连接服务类
ClientBootstrap clientBootstrap=new ClientBootstrap();
//会话列表
// List<Channel> channelList=new Array