Example #1
0
 /// <summary>
 /// 引发客户端移除前事件
 /// </summary>
 /// <param name="server">将要被也称的客户端</param>
 protected virtual void OnServerRemoving(TcpServer server)
 {
     if (ServerRemoving != null)
     {
         TcpServerEventArgs e = new TcpServerEventArgs(server);
         ServerRemoving(this, e);
     }
 }
Example #2
0
 /// <summary>
 /// 引发客户端已连接事件
 /// </summary>
 /// <param name="server">已连接的客户端</param>
 protected virtual void OnServerCreated(TcpServer server)
 {
     if (ServerCreated != null)
     {
         TcpServerEventArgs e = new TcpServerEventArgs(server);
         ServerCreated(this, e);
     }
 }