

StrRetPage = "Unable to connect to host" Socket^ s = gcnew Socket( AddressFamily::InterNetwork, SocketType::Stream, Creates the Socket for sending data over TCP. The following example uses SocketType.Stream as a parameter to the Socket constructor. Stream uses the Transmission Control Protocol ( ProtocolType. A Socket of this type communicates with a single peer and requires a remote host connection before communication can begin. Supports reliable, two-way, connection-based byte streams without the duplication of data and without preservation of boundaries. A Socket of type Seqpacket communicates with a single peer and requires a remote host connection before communication can begin. Seqpacket does not duplicate data, and it preserves boundaries within the data stream. Provides connection-oriented and reliable two-way transfer of ordered byte streams across a network. With Rdm, you can communicate with multiple peers. If you initialize a Socket using Rdm, you do not require a remote host connection before sending and receiving data. Furthermore, the sender is notified if messages are lost. Rdm (Reliably Delivered Messages) messages arrive unduplicated and in order. Supports connectionless, message-oriented, reliably delivered messages, and preserves message boundaries in data. Received datagrams return with the IP header and options intact. Your application must provide a complete IP header when sending. Icmp) and Internet Group Management Protocol ( ProtocolType. Using Raw, you can communicate using protocols like Internet Control Message Protocol ( ProtocolType. Supports access to the underlying transport protocol. Dgram uses the Datagram Protocol ( ProtocolType.

A Socket of type Dgram requires no connection prior to sending and receiving data, and can communicate with multiple peers. Messages might be lost or duplicated and might arrive out of order. Supports datagrams, which are connectionless, unreliable messages of a fixed (typically small) maximum length.
