using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Linq.Expressions; using System.Dynamic; using System.ComponentModel; using System.Diagnostics; namespace ConsoleApplication { public struct MyStruct {…
一.先来看一下客户端示例代码. public class NettyClientTest { public void connect(int port, String host) throws Exception { EventLoopGroup group = new NioEventLoopGroup();//与服务端不同,客户端只需要一个IO线程组 try { Bootstrap b = new Bootstrap(); b.group(group) .option(ChannelOpti…