实例 1.准备CS项目,windows窗体应用程序,拖进来一个label控件来接受BS的参数,并显示,右击生成,复制该文件的bin目录下的exe,例如放在以下路径,例如C:\\simu\\下, 2.编写记事本simu.reg,双击后写入注册表 Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\simu]"URL Protocol"="C:\\simu\\Simu.exe"@="SimuProto…
一.首先来看一段服务端的示例代码: public class NettyTestServer { public void bind(int port) throws Exception{ EventLoopGroup bossgroup = new NioEventLoopGroup();//创建BOSS线程组 EventLoopGroup workgroup = new NioEventLoopGroup();//创建WORK线程组 try{ ServerBootstrap b = new S…
Netty服务端启动代码: public final class EchoServer { static final int PORT = Integer.parseInt(System.getProperty("port", "8007")); public static void main(String[] args) throws Exception { // Configure the server. EventLoopGroup bossGroup = n…