异常错误:
我的client端启动器代码:
ChannelInitializer代码
解决方案:在socketChannel.pipeline().addLast(context.newHandler(socketChannel.alloc()));
里加上你目标服务器的host+port就好了。
即socketChannel.pipeline().addLast(context.newHandler(socketChannel.alloc(), host, port));



