Class IPComparer
Equality comparer used by the netcode to distinguish between peers.
Inheritance
System.Object
    IPComparer
  Implements
System.Collections.Generic.IEqualityComparer<IPEndPoint>
  Namespace: SuperNet.Netcode.Util
Assembly: cs.temp.dll.dll
Syntax
public sealed class IPComparer : IEqualityComparer<IPEndPoint>
  Methods
Equals(IPEndPoint, IPEndPoint)
Check if both address and port match.
Declaration
public bool Equals(IPEndPoint x, IPEndPoint y)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IPEndPoint | x | First IP  | 
      
| IPEndPoint | y | Second IP  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | True if they match, false if not.  | 
      
GetHashCode(IPEndPoint)
Construct a hash code based on address and port.
Declaration
public int GetHashCode(IPEndPoint obj)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IPEndPoint | obj | Object to construct the hash code from.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Int32 | Constructed hash code.  | 
      
Implements
      System.Collections.Generic.IEqualityComparer<T>