ProtocolType ProtocolType ProtocolType ProtocolType Enum


指定 Socket 类支持的协议。Specifies the protocols that the Socket class supports.

public enum class ProtocolType
public enum ProtocolType
type ProtocolType = 
Public Enum ProtocolType


Ggp Ggp Ggp Ggp 3

网关到网关协议。Gateway To Gateway Protocol.

Icmp Icmp Icmp Icmp 1

网际消息控制协议。Internet Control Message Protocol.

IcmpV6 IcmpV6 IcmpV6 IcmpV6 58

用于 IPv6 的 Internet 控制消息协议。Internet Control Message Protocol for IPv6.

Idp Idp Idp Idp 22

Internet 数据报协议。Internet Datagram Protocol.

Igmp Igmp Igmp Igmp 2

网际组管理协议。Internet Group Management Protocol.


网际协议。Internet Protocol.

IPSecAuthenticationHeader IPSecAuthenticationHeader IPSecAuthenticationHeader IPSecAuthenticationHeader 51

IPv6 身份验证头。IPv6 Authentication header. 有关详细信息,请参阅 上的 RFC 2292,第 2.2.1 节。For details, see RFC 2292 section 2.2.1, available at

IPSecEncapsulatingSecurityPayload IPSecEncapsulatingSecurityPayload IPSecEncapsulatingSecurityPayload IPSecEncapsulatingSecurityPayload 50

IPv6 封装式安全措施负载头。IPv6 Encapsulating Security Payload header.

IPv4 IPv4 IPv4 IPv4 4

Internet 协议版本 4。Internet Protocol version 4.

IPv6 IPv6 IPv6 IPv6 41

Internet 协议版本 6 (IPv6)。Internet Protocol version 6 (IPv6).

IPv6DestinationOptions IPv6DestinationOptions IPv6DestinationOptions IPv6DestinationOptions 60

IPv6 目标选项头。IPv6 Destination Options header.

IPv6FragmentHeader IPv6FragmentHeader IPv6FragmentHeader IPv6FragmentHeader 44

IPv6 片段头。IPv6 Fragment header.

IPv6HopByHopOptions IPv6HopByHopOptions IPv6HopByHopOptions IPv6HopByHopOptions 0

IPv6 逐跳选项头。IPv6 Hop by Hop Options header.

IPv6NoNextHeader IPv6NoNextHeader IPv6NoNextHeader IPv6NoNextHeader 59

IPv6 No Next 头。IPv6 No next header.

IPv6RoutingHeader IPv6RoutingHeader IPv6RoutingHeader IPv6RoutingHeader 43

IPv6 路由头。IPv6 Routing header.

Ipx Ipx Ipx Ipx 1000

Internet 数据包交换协议。Internet Packet Exchange Protocol.


网络磁盘协议(非正式)。Net Disk Protocol (unofficial).

Pup Pup Pup Pup 12

PARC 通用数据包协议。PARC Universal Packet Protocol.

Raw Raw Raw Raw 255

原始 IP 数据包协议。Raw IP packet protocol.

Spx Spx Spx Spx 1256

顺序包交换协议。Sequenced Packet Exchange protocol.

SpxII SpxII SpxII SpxII 1257

顺序包交换协议第 2 版。Sequenced Packet Exchange version 2 protocol.

Tcp Tcp Tcp Tcp 6

传输控制协议。Transmission Control Protocol.

Udp Udp Udp Udp 17

用户数据报协议。User Datagram Protocol.

Unknown Unknown Unknown Unknown -1

未知协议。Unknown protocol.

Unspecified Unspecified Unspecified Unspecified 0

未指定的协议。Unspecified protocol.


Socket类使用ProtocolType枚举,以通知 Windows 套接字 API 的请求的协议。The Socket class uses the ProtocolType enumeration to inform the Windows Sockets API of the requested protocol. 必须是请求的协议的低级别的驱动程序软件的计算机上存在Socket以便能够成功创建。Low-level driver software for the requested protocol must be present on the computer for the Socket to be created successfully.