Beispiel #1
0
        /// <summary>
        /// 已重载。
        /// </summary>
        protected override void EnsureCreateServer()
        {
            Name = "文件服务";

            DME_TcpServer svr = new DME_TcpServer(Address, Port);
            svr.Accepted += new EventHandler<DME_NetEventArgs>(server_Accepted);
            // 允许同时处理多个数据包
            svr.NoDelay = false;
            // 使用线程池来处理事件
            svr.UseThreadPool = true;
        }
Beispiel #2
0
 /// <summary>
 /// 已重载。
 /// </summary>
 protected override void EnsureCreateServer()
 {
     DME_TcpServer svr = new DME_TcpServer(Address, Port);
     svr.Accepted += new EventHandler<DME_NetEventArgs>(OnAccepted);
 }