Beispiel #1
0
 public void Disconnect()
 {
     if (!Mode)
     {
         if (ClientsPool.ContainsKey(EnemyPoint.ToString()))
         {
             SendMessage(ClientsPool[EnemyPoint.ToString()].GetStream(), MessageCode.Fin);
             ClientsPool[EnemyPoint.ToString()].Close();
         }
     }
 }
Beispiel #2
0
 private void ClearWatingList()
 {
     //clears all waiting users except the choosen one
     Dictionary <string, TcpClient> .KeyCollection Keys = ClientsPool.Keys;
     foreach (string key in Keys)
     {
         if (key != EnemyPoint.ToString())
         {
             ClientsPool.Remove(key);
         }
     }
 }