public bool IsClientAcceptable(uint clientId, IPEndPoint clientEP) { if (this.AcceptableClients == null) { return(true); } if (this.AcceptableClients.Count() == 0) { return(true); } foreach (var item in this.AcceptableClients) { if (item.Key == clientId) { return(HelperTools.IsEndPointValid(item.Value, clientEP)); } } return(false); }