Exemple #1
0
	    private void ClosedStream(object sender, StreamClosedEventArgs e)
		{
			if (clients.ContainsKey(e.Source))
			{
				e.Client.Close();
				clients[e.Source].RemoveAll(c => !c.Connected);
				if (clients[e.Source].Count == 0)
				{
					clients.Remove(e.Source);
					CloseStreamInternal(e.Source);
				}
			} else
			{
				CloseStreamInternal(e.Source);
			}
		}
Exemple #2
0
 private void ClosedStream(object sender, StreamClosedEventArgs e)
 {
     if (clients.ContainsKey(e.Source))
     {
         e.Client.Close();
         clients[e.Source].RemoveAll(c => !c.Connected);
         if (clients[e.Source].Count == 0)
         {
             clients.Remove(e.Source);
             CloseStreamInternal(e.Source);
         }
     }
     else
     {
         CloseStreamInternal(e.Source);
     }
 }