Sockettype enumeration -- specifies the socket type represented by an instance of the socket class

Source: Internet
Author: User
Member name Description
Dgram

Supported by the. NET Framework Lite version.

Supports datagram, that is, the maximum length of a fixed (usually very small) connectionless and unreliable message. Messages may be lost or duplicated and may not be arranged in order when they arrive.DgramA Socket type does not require any connection before sending or receiving data, and can communicate with multiple hosts.DgramUse the datagram protocol (Udp) and InterNetwork AddressFamily.
Raw

Supported by the. NET Framework Lite version.

Supports access to the basic transmission protocol. UseSocketType RawYou can use the Internet message Control Protocol (Icmp) and Internet Group Management Protocol (Igmp) for communication. At the time of sending, your application must provide the complete IP header. The IP header and option of the received datagram remain unchanged when it is returned.
Rdm

Supported by the. NET Framework Lite version.

Supports messages that are connectionless, message-oriented, and reliably sent, and retains the message boundary in the data. RDM (messages sent in a reliable manner) messages are not duplicated when they arrive and are arranged in order. In addition, if the message is lost, the sender will be notified. If you useRdmInitializationSocketYou do not need to establish a remote host connection before sending and receiving data. ExploitationRdmYou can communicate with multiple hosts.
Seqpacket

Supported by the. NET Framework Lite version.

The Network provides connection-oriented and reliable bidirectional transmission of sorted byte streams.SeqpacketIt does not repeat data and retains the boundary in the data stream.SeqpacketTypeSocketCommunicates with a single host and requires remote host connection before the communication starts.
Stream

Supported by the. NET Framework Lite version.

Supports reliable, bidirectional, and connection-based byte streams without repeating data or retaining boundaries. This typeSocketCommunicates with a single host and requires remote host connection before the communication starts.StreamUse the Transport Control Protocol (Tcp) ProtocolType andInterNetworkAddressFamily.
Unknown

Supported by the. NET Framework Lite version.

Specify unknownSocketType.

 

Note:SocketTypeSometimes it is implicitly indicated inAddressFamilyUsed inProtocolType. For example, whenSocketTypeIsDgram,ProtocolTypeAlways Udp. WhenSocketTypeIsStream,ProtocolTypeAlways Tcp. If you try to create an incompatible combinationSocket, ThenSocketWill cause SocketException.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.