ProxySocket.ToEndPoint Method
Namespace: Rebex.Net
Assembly: Rebex.Networking.dll (version 7.0.9083)
ToEndPoint(String, Int32)
Converts the host address and port into an IP endpoint. If the host address is not an IP address, returns null.
Declaration
public static IPEndPoint ToEndPoint(string host, int port)
Parameters
Type | Name | Description |
---|---|---|
String | host | Host name or IP address. |
Int32 | port | Host port. |
Returns
Type | Description |
---|---|
IPEndPoint | IP endpoint. |
ToEndPoint(IPHostEntry, Int32)
Chooses the most appropriate IP endpoint to use from the host entry.
Declaration
public static IPEndPoint ToEndPoint(IPHostEntry hostEntry, int port)
Parameters
Type | Name | Description |
---|---|---|
IPHostEntry | hostEntry | Host entry. |
Int32 | port | Port. |
Returns
Type | Description |
---|---|
IPEndPoint | IP endpoint. |