コード例 #1
0
 /// <summary>
 /// Tries the remove end point from the list of connection attempts.
 /// </summary>
 /// <param name="endPoint">The end point to remove.</param>
 /// <returns><see langword="true"/> if the endpoint has been removed, <see langword="false"/> if the endpoint has not been found.</returns>
 public bool TryRemoveEndPoint(IPEndPoint endPoint)
 {
     endPoint = endPoint.AsIPEndPoint().EnsureIPv6();
     return(connectionsToAttempt.RemoveAll(remoteEndPoint => remoteEndPoint.EndPoint.Equals(endPoint)) > 0);
 }