简单几部就可以开发出高性能的C/S模式tcp服务器 演示源码里有数据报文重载势力,可以根据实际需求进行 不同数据格式的开发。 已经基于这个开发多个物联网相关实际应用 启动部分代码 //新建服务TcpSvr svr = new TcpSvr(6000, 50, new Coder(Coder.EncodingMothord.Unicode)); this.SetText("创建tcp服务成功,端口:6000"+" 最大连接数:50" +"\r\n"); //定义服务器的4个事件 //服务器满 svr.ServerFull += new NetEvent(ServerFull); //新客户端连接 svr.ClientConn += new NetEvent(ClientConn); //客户端关闭 svr.ClientClose += new NetEvent(ClientClose); //接收到数据 svr.RecvData += new NetEvent(RecvData); this.SetText("创建四个事件(服务器满、新客户端连接、客户端关闭、接收到数据)成功服务成功\r\n"); //添加报文拆包 svr.Resovlver = new MyDatagramResolver(); this.SetText("创建报文分析器成功\r\n"); svr.Start(); this.SetText("服务开启成功!!!\r\n");
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![package](https://csdnimg.cn/release/downloadcmsfe/public/img/package.f3fc750b.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/RAR.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/RAR.png)
- 1
![avatar](https://profile-avatar.csdnimg.cn/c963fd2425d4444392782b0a101361f8_ggbb190.jpg!1)
- 粉丝: 35
- 资源: 12
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
最新资源
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)
- 1
- 2
- 3
- 4
- 5
- 6
前往页