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); } } }
void client_OnDisconnectEvent(object sender, DisconenctEventArgs args) { SetStatus("和服务器断开"); SetConencetStatus(false); }