Ejemplo n.º 1
0
        void tcpComm_OnClientDisconnect(object sender, DataEventArgs e)
        {
            //TCP客户端断开
            IPEndPoint iep = ((IPEndPoint)e.Client.RemoteEndPoint);

            SafeOutText("[" + DateTime.Now.ToString() + "]");
            SafeOutText("[TCP] " + iep.Address.ToString() + ":" + iep.Port.ToString() + "断开! ("
                + tcpServer.ClientList.Count.ToString() + "/" + tcpServer.MaxClient.ToString() + ")");
            SafeOutText("");

            //更新用户连接列表
            ShowClientList();
        }
Ejemplo n.º 2
0
 void tcpComm_OnServerFull(object sender, DataEventArgs e)
 {
     //TCP服务器连接已满
     SafeOutText("[" + DateTime.Now.ToString() + "]");
     SafeOutText("[TCP]服务器连接已满!");
     SafeOutText("");
 }
Ejemplo n.º 3
0
 void tcpComm_OnClientDataAvailable(object sender, DataEventArgs e)
 {
     //收到数据
     OnDataReceived(this, e.Data);
 }