Namespace: System.Net
Assembly: System.Net.Primitives (in System.Net.Primitives.dll)
The IPEndPoint class represents a network endpoint as an IP address and a port number. It is used to identify a specific process on a specific machine. This class is an immutable object, meaning its properties cannot be changed after it has been created.
IPEndPoint can represent an IPv4 or an IPv6 endpoint. The AddressFamily property determines whether the endpoint uses IPv4 or IPv6.
Name | Description |
---|---|
IPEndPoint(IPAddress, Int32) | Initializes a new instance of the IPEndPoint class with the specified IP address and port number. |
IPEndPoint(Int64, Int32) | Initializes a new instance of the IPEndPoint class with the specified address family and port number. |
Name | Description |
---|---|
Address | Gets or sets the IP address of the endpoint. |
AddressFamily | Gets the address family of the endpoint. |
Port | Gets or sets the port number of the endpoint. |
Name | Description |
---|---|
Create(Int64) | Creates a new IPEndPoint instance from the specified 64-bit integer. |
Equals(Object) | Determines whether the specified object is an IPEndPoint that is equivalent to this instance. |
GetHashCode() | Serves as a hash function for the type. |
Parse(String) | Parses a string representation of an endpoint and returns an IPEndPoint instance. |
ToString() | Returns a string representation of the IPEndPoint. |
Gets or sets the IP address of the endpoint.
Gets the address family of the endpoint.
Gets or sets the port number of the endpoint.
Creates a new IPEndPoint instance from the specified 64-bit integer.
System.Net.EndPoint
A new IPEndPoint instance.
Determines whether the specified object is an IPEndPoint that is equivalent to this instance.
System.Boolean
true if the specified object is an IPEndPoint that is equivalent to this instance; otherwise, false.
Serves as a hash function for the type. Suitable for use in hashing algorithms and data structures such as a hash table.
System.Int32
A hash code for the current object.
Parses a string representation of an endpoint and returns an IPEndPoint instance.
System.Net.IPEndPoint
An IPEndPoint instance representing the parsed endpoint.
Returns a string representation of the IPEndPoint in the format "ipAddress:port".
System.String
A string representation of the IPEndPoint.