public void RemoveClient(TcpClient client) { var sender = Senders.Where(p => p.Tcp != null && p.Tcp.Equals(client)).FirstOrDefault(); if (sender != null) { sender.Tcp.Close(); Senders.Remove(sender); } }
public Sender GetSender(TcpClient client) { var sender = Senders.Where(p => p.Tcp != null && p.Tcp.Equals(client)).FirstOrDefault(); return(sender); }