DnsEndPoint Class

Definition

将网络终结点表示为主机名或 IP 地址和端口号的字符串表示方法。Represents a network endpoint as a host name or a string representation of an IP address and a port number.

public ref class DnsEndPoint : System::Net::EndPoint
public class DnsEndPoint : System.Net.EndPoint
type DnsEndPoint = class
    inherit EndPoint
Public Class DnsEndPoint
Inherits EndPoint
Inheritance
DnsEndPoint

Remarks

DnsEndPoint 类包含应用程序连接到主机上的服务所需的主机名、IP 地址和远程端口信息。The DnsEndPoint class contains a host name or an IP address and remote port information needed by an application to connect to a service on a host. 通过组合服务的主机名或 IP 地址和端口号,DnsEndPoint 类形成服务的连接点。By combining the host name or IP address and port number of a service, the DnsEndPoint class forms a connection point to a service.

Constructors

DnsEndPoint(String, Int32)

用主机名或 IP 地址和端口号的字符串表示形式初始化 DnsEndPoint 类的新实例。Initializes a new instance of the DnsEndPoint class with the host name or string representation of an IP address and a port number.

DnsEndPoint(String, Int32, AddressFamily)

用主机名或 IP 地址、端口号和地址族的字符串表示形式初始化 DnsEndPoint 类的新实例。Initializes a new instance of the DnsEndPoint class with the host name or string representation of an IP address, a port number, and an address family.

Properties

AddressFamily

获取网际协议 (IP) 地址族。Gets the Internet Protocol (IP) address family.

Host

获取主机的主机名或 Internet 协议 (IP) 地址的字符串表示形式。Gets the host name or string representation of the Internet Protocol (IP) address of the host.

Port

获取 DnsEndPoint 的端口号。Gets the port number of the DnsEndPoint.

Methods

Create(SocketAddress)

通过 SocketAddress 实例创建 EndPoint 实例。Creates an EndPoint instance from a SocketAddress instance.

(Inherited from EndPoint)
Equals(Object)

比较两个 DnsEndPoint 对象。Compares two DnsEndPoint objects.

GetHashCode()

返回 DnsEndPoint 的哈希值。Returns a hash value for a DnsEndPoint.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
Serialize()

将终结点信息序列化为 SocketAddress 实例。Serializes endpoint information into a SocketAddress instance.

(Inherited from EndPoint)
ToString()

返回 DnsEndPoint 的主机名或 IP 地址和端口号的字符串表示形式。Returns the host name or string representation of the IP address and port number of the DnsEndPoint.

Applies to