From e6a26ee148587327478d9a82624a820c907b6e16 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期三, 04 十一月 2020 14:58:15 +0800 Subject: [PATCH] 20201104 --- HDL_ON/DriverLayer/Control_TcpServer.cs | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/HDL_ON/DAL/Net/TcpListener.cs b/HDL_ON/DriverLayer/Control_TcpServer.cs similarity index 98% rename from HDL_ON/DAL/Net/TcpListener.cs rename to HDL_ON/DriverLayer/Control_TcpServer.cs index 526704e..df81d4b 100644 --- a/HDL_ON/DAL/Net/TcpListener.cs +++ b/HDL_ON/DriverLayer/Control_TcpServer.cs @@ -1,5 +1,5 @@ 锘�/* - * 璇ョ被鐢ㄤ簬绠$悊tcp杩炴帴閫氳 + * 璇ョ被鐢ㄤ簬绠$悊tcp浣滀负鏈嶅姟绔繛鎺ラ�氳 */ using System; using System.Collections.Generic; @@ -9,14 +9,13 @@ using Shared; using HDL_ON.Entity; -namespace HDL_ON.DAL.Net +namespace HDL_ON.DriverLayer { /// <summary> - /// 鏈嶅姟绔� + /// TCP鏈嶅姟绔� /// </summary> - public class TcpListener + public class Control_TcpServer { - private Socket ServerSocket = null;//鏈嶅姟绔� public Dictionary<string, MySession> dic_ClientSocket = new Dictionary<string, MySession>();//tcp瀹㈡埛绔瓧鍏� private Dictionary<string, Thread> dic_ClientThread = new Dictionary<string, Thread>();//绾跨▼瀛楀吀,姣忔柊澧炰竴涓繛鎺ュ氨娣诲姞涓�鏉$嚎绋� @@ -26,7 +25,7 @@ /// 鍚姩鏈嶅姟 /// </summary> /// <param name="port">绔彛鍙�</param> - public bool OpenServer(int port) + public bool OpenServer(int port = 8586) { try { -- Gitblit v1.8.0