示例#1
0
 void server_OnClientDisconnectEvent(object sender, DisconenctEventArgs args)
 {
     portMap.Remove(args.client);
     foreach (SocketMap sm in portMap.Values)
     {
         if (sm.Clients.Contains(args.client))
         {
             sm.Clients.Remove(args.client);
         }
     }
     foreach (int p in portRef.Keys)
     {
         if (portRef[p].Contains(args.client))
         {
             portRef[p].Remove(args.client);
         }
     }
 }
示例#2
0
 void client_OnDisconnectEvent(object sender, DisconenctEventArgs args)
 {
     SetStatus("和服务器断开");
     SetConencetStatus(false);
 }