Asposecpplib
System::Net::Sockets Namespace Reference

Classes

class  LingerOption
 Specifies whether a socket will remain connected after a call to the Close() or Close() methods. It also specifies the period the socket will remain connected if sending of the data continues. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  Details_SocketException
 Represents the exception thrown when a socket error occurs. Never create instances of this class manually. Use the SocketException class instead. Never wrap the SocketException class instances into System::SmartPtr. More...
 
class  IPPacketInformation
 Represents information about the packet. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  NetworkStream
 Provides the underlying stream of the data for the network access. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  Socket
 The Socket class implements the Berkeley sockets interface. More...
 
class  TcpClient
 Represents a client for the TCP network services. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  TcpListener
 Represents a listener for the TCP network services. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 
class  UdpClient
 Provides User Datagram Protocol (UDP) network services. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument. More...
 

Typedefs

using SocketException = System::ExceptionWrapper< Details_SocketException >
 

Enumerations

enum class  SocketType {
  Stream = 1 , Dgram = 2 , Raw = 3 , Rdm = 4 ,
  Seqpacket = 5 , Unknown = static_cast<int32_t>(-1)
}
 Enumerates the socket types. More...
 
enum class  AddressFamily {
  Unknown = -1 , Unspecified = 0 , Unix = 1 , InterNetwork = 2 ,
  ImpLink = 3 , Pup = 4 , Chaos = 5 , NS = 6 ,
  Ipx = NS , Iso = 7 , Osi = Iso , Ecma = 8 ,
  DataKit = 9 , Ccitt = 10 , Sna = 11 , DecNet = 12 ,
  DataLink = 13 , Lat = 14 , HyperChannel = 15 , AppleTalk = 16 ,
  NetBios = 17 , VoiceView = 18 , FireFox = 19 , Banyan = 21 ,
  Atm = 22 , InterNetworkV6 = 23 , Cluster = 24 , Ieee12844 = 25 ,
  Irda = 26 , NetworkDesigners = 28 , Max = 29
}
 Enumerates the address families. More...
 
enum class  IOControlCode : int64_t {
  AsyncIO = 0x8004667D , NonBlockingIO = 0x8004667E , DataToRead = 0x4004667F , OobDataRead = 0x40047307 ,
  AssociateHandle = 0x88000001 , EnableCircularQueuing = 0x28000002 , Flush = 0x28000004 , GetBroadcastAddress = 0x48000005 ,
  GetExtensionFunctionPointer = 0xC8000006 , GetQos = 0xC8000007 , GetGroupQos = 0xC8000008 , MultipointLoopback = 0x88000009 ,
  MulticastScope = 0x8800000A , SetQos = 0x8800000B , SetGroupQos = 0x8800000C , TranslateHandle = 0xC800000D ,
  RoutingInterfaceQuery = 0xC8000014 , RoutingInterfaceChange = 0x88000015 , AddressListQuery = 0x48000016 , AddressListChange = 0x28000017 ,
  QueryTargetPnpHandle = 0x48000018 , NamespaceChange = 0x88000019 , AddressListSort = 0xC8000019 , ReceiveAll = 0x98000001 ,
  ReceiveAllMulticast = 0x98000002 , ReceiveAllIgmpMulticast = 0x98000003 , KeepAliveValues = 0x98000004 , AbsorbRouterAlert = 0x98000005 ,
  UnicastInterface = 0x98000006 , LimitBroadcasts = 0x98000007 , BindToInterface = 0x98000008 , MulticastInterface = 0x98000009 ,
  AddMulticastGroupOnInterface = 0x9800000A , DeleteMulticastGroupFromInterface = 0x9800000B
}
 Enumerates the IO control codes. More...
 
enum class  ProtocolFamily {
  Unknown = static_cast<int32_t>(System::Net::Sockets::AddressFamily::Unknown) , Unspecified = static_cast<int32_t>(System::Net::Sockets::AddressFamily::Unspecified) , Unix = static_cast<int32_t>(System::Net::Sockets::AddressFamily::Unix) , InterNetwork = static_cast<int32_t>(System::Net::Sockets::AddressFamily::InterNetwork) ,
  ImpLink = static_cast<int32_t>(System::Net::Sockets::AddressFamily::ImpLink) , Pup = static_cast<int32_t>(System::Net::Sockets::AddressFamily::Pup) , Chaos = static_cast<int32_t>(System::Net::Sockets::AddressFamily::Chaos) , NS = static_cast<int32_t>(System::Net::Sockets::AddressFamily::NS) ,
  Ipx = static_cast<int32_t>(System::Net::Sockets::AddressFamily::Ipx) , Iso = static_cast<int32_t>(System::Net::Sockets::AddressFamily::Iso) , Osi = static_cast<int32_t>(System::Net::Sockets::AddressFamily::Osi) , Ecma = static_cast<int32_t>(System::Net::Sockets::AddressFamily::Ecma) ,
  DataKit = static_cast<int32_t>(System::Net::Sockets::AddressFamily::DataKit) , Ccitt = static_cast<int32_t>(System::Net::Sockets::AddressFamily::Ccitt) , Sna = static_cast<int32_t>(System::Net::Sockets::AddressFamily::Sna) , DecNet = static_cast<int32_t>(System::Net::Sockets::AddressFamily::DecNet) ,
  DataLink = static_cast<int32_t>(System::Net::Sockets::AddressFamily::DataLink) , Lat = static_cast<int32_t>(System::Net::Sockets::AddressFamily::Lat) , HyperChannel = static_cast<int32_t>(System::Net::Sockets::AddressFamily::HyperChannel) , AppleTalk = static_cast<int32_t>(System::Net::Sockets::AddressFamily::AppleTalk) ,
  NetBios = static_cast<int32_t>(System::Net::Sockets::AddressFamily::NetBios) , VoiceView = static_cast<int32_t>(System::Net::Sockets::AddressFamily::VoiceView) , FireFox = static_cast<int32_t>(System::Net::Sockets::AddressFamily::FireFox) , Banyan = static_cast<int32_t>(System::Net::Sockets::AddressFamily::Banyan) ,
  Atm = static_cast<int32_t>(System::Net::Sockets::AddressFamily::Atm) , InterNetworkV6 = static_cast<int32_t>(System::Net::Sockets::AddressFamily::InterNetworkV6) , Cluster = static_cast<int32_t>(System::Net::Sockets::AddressFamily::Cluster) , Ieee12844 = static_cast<int32_t>(System::Net::Sockets::AddressFamily::Ieee12844) ,
  Irda = static_cast<int32_t>(System::Net::Sockets::AddressFamily::Irda) , NetworkDesigners = static_cast<int32_t>(System::Net::Sockets::AddressFamily::NetworkDesigners) , Max = static_cast<int32_t>(System::Net::Sockets::AddressFamily::Max)
}
 Enumerates the protocol families. More...
 
enum class  ProtocolType {
  IP = 0 , IPv6HopByHopOptions = 0 , Icmp = 1 , Igmp = 2 ,
  Ggp = 3 , IPv4 = 4 , Tcp = 6 , Pup = 12 ,
  Udp = 17 , Idp = 22 , IPv6 = 41 , IPv6RoutingHeader = 43 ,
  IPv6FragmentHeader = 44 , IPSecEncapsulatingSecurityPayload = 50 , IPSecAuthenticationHeader = 51 , IcmpV6 = 58 ,
  IPv6NoNextHeader = 59 , IPv6DestinationOptions = 60 , ND = 77 , Raw = 255 ,
  Unspecified = 0 , Ipx = 1000 , Spx = 1256 , SpxII = 1257 ,
  Unknown = static_cast<int32_t>(-1)
}
 Enumerates the protocol types. More...
 
enum class  SelectMode { SelectRead = 0 , SelectWrite = 1 , SelectError = 2 }
 Specifies the mode for polling the status of the socket. More...
 
enum class  SocketError {
  Success = 0 , SocketError = -1 , Interrupted = 10004 , AccessDenied = 10013 ,
  Fault = 10014 , InvalidArgument = 10022 , TooManyOpenSockets = 10024 , WouldBlock = 10035 ,
  InProgress = 10036 , AlreadyInProgress = 10037 , NotSocket = 10038 , DestinationAddressRequired = 10039 ,
  MessageSize = 10040 , ProtocolType = 10041 , ProtocolOption = 10042 , ProtocolNotSupported = 10043 ,
  SocketNotSupported = 10044 , OperationNotSupported = 10045 , ProtocolFamilyNotSupported = 10046 , AddressFamilyNotSupported = 10047 ,
  AddressAlreadyInUse = 10048 , AddressNotAvailable = 10049 , NetworkDown = 10050 , NetworkUnreachable = 10051 ,
  NetworkReset = 10052 , ConnectionAborted = 10053 , ConnectionReset = 10054 , NoBufferSpaceAvailable = 10055 ,
  IsConnected = 10056 , NotConnected = 10057 , Shutdown = 10058 , TimedOut = 10060 ,
  ConnectionRefused = 10061 , HostDown = 10064 , HostUnreachable = 10065 , ProcessLimit = 10067 ,
  SystemNotReady = 10091 , VersionNotSupported = 10092 , NotInitialized = 10093 , Disconnecting = 10101 ,
  TypeNotFound = 10109 , HostNotFound = 11001 , TryAgain = 11002 , NoRecovery = 11003 ,
  NoData = 11004
}
 Enumerates the socket error types. More...
 
enum class  SocketFlags {
  None = 0x0000 , OutOfBand = 0x0001 , Peek = 0x0002 , DontRoute = 0x0004 ,
  Truncated = 0x0100 , ControlDataTruncated = 0x0200 , Broadcast = 0x0400 , Multicast = 0x0800 ,
  Partial = 0x8000
}
 Provides constant values for the socket messages. More...
 
enum class  SocketOptionLevel {
  Socket = 0xffff , IP = static_cast<int32_t>(System::Net::Sockets::ProtocolType::IP) , IPv6 = static_cast<int32_t>(System::Net::Sockets::ProtocolType::IPv6) , Tcp = static_cast<int32_t>(System::Net::Sockets::ProtocolType::Tcp) ,
  Udp = static_cast<int32_t>(System::Net::Sockets::ProtocolType::Udp)
}
 Defines socket option levels for the 'Socket' class. More...
 
enum class  SocketOptionName {
  Debug = 0x0001 , AcceptConnection = 0x0002 , ReuseAddress = 0x0004 , KeepAlive = 0x0008 ,
  DontRoute = 0x0010 , Broadcast = 0x0020 , UseLoopback = 0x0040 , Linger = 0x0080 ,
  OutOfBandInline = 0x0100 , DontLinger = static_cast<int32_t>(~Linger) , ExclusiveAddressUse = static_cast<int32_t>(~ReuseAddress) , SendBuffer = 0x1001 ,
  ReceiveBuffer = 0x1002 , SendLowWater = 0x1003 , ReceiveLowWater = 0x1004 , SendTimeout = 0x1005 ,
  ReceiveTimeout = 0x1006 , Error = 0x1007 , Type = 0x1008 , ReuseUnicastPort = 0x3007 ,
  MaxConnections = 0x7fffffff , IPOptions = 1 , HeaderIncluded = 2 , TypeOfService = 3 ,
  IpTimeToLive = 4 , MulticastInterface = 9 , MulticastTimeToLive = 10 , MulticastLoopback = 11 ,
  AddMembership = 12 , DropMembership = 13 , DontFragment = 14 , AddSourceMembership = 15 ,
  DropSourceMembership = 16 , BlockSource = 17 , UnblockSource = 18 , PacketInformation = 19 ,
  HopLimit = 21 , IPProtectionLevel = 23 , IPv6Only = 27 , NoDelay = 1 ,
  BsdUrgent = 2 , Expedited = 2 , NoChecksum = 1 , ChecksumCoverage = 20 ,
  UpdateAcceptContext = 0x700B , UpdateConnectContext = 0x7010
}
 Defines socket option names for the Socket class. More...
 
enum class  SocketShutdown { Receive = 0x00 , Send = 0x01 , Both = 0x02 }
 Defines constants used by the Socket.Shutdown method. More...
 

Functions

 DECLARE_ENUM_OPERATORS (System::Net::Sockets::AddressFamily)
 Declaration of template arithmetic operators for values of the AddressFamily enum type. More...
 
bool operator== (IPPacketInformation left, IPPacketInformation right)
 
bool operator!= (IPPacketInformation left, IPPacketInformation right)
 
 DECLARE_ENUM_OPERATORS (System::Net::Sockets::SocketFlags)
 Declaration of template arithmetic operators for values of the SocketFlags enum type. More...
 

Typedef Documentation

◆ SocketException

Enumeration Type Documentation

◆ AddressFamily

Enumerates the address families.

Enumerator
Unknown 

The unknown address family.

Unspecified 

The unspecified address family.

Unix 

The Unix local to host the address family.

InterNetwork 

The address for IPv4.

ImpLink 

The ARPANET IMP address.

Pup 

The address for the PUP protocols.

Chaos 

The address for the MIT CHAOS protocols.

NS 

The address for the Xerox NS protocols.

Ipx 

The IPX or SPX address.

Iso 

The address for the ISO protocols.

Osi 

The address for the OSI protocols.

Ecma 

The European Computer Manufacturers Association (ECMA) address.

DataKit 

The address for the Datakit protocols.

Ccitt 

Addresses for the CCITT protocols, e.g. X.25.

Sna 

The IBM SNA address.

DecNet 

The DECnet address.

DataLink 

The direct data-link interface address.

Lat 

The LAT address.

HyperChannel 

The NSC Hyperchannel address.

AppleTalk 

The AppleTalk address.

NetBios 

The NetBios address.

VoiceView 

The VoiceView address.

FireFox 

The FireFox address.

Banyan 

The Banyan address.

Atm 

The native ATM services address.

InterNetworkV6 

The address for IPv6.

Cluster 

The address for the Microsoft cluster products.

Ieee12844 

The IEEE 1284.4 workgroup address.

Irda 

The IrDA address.

NetworkDesigners 

The address for the Network Designers OSI gateway-enabled protocols.

Max 

The MAX address.

◆ IOControlCode

enum System::Net::Sockets::IOControlCode : int64_t
strong

Enumerates the IO control codes.

Enumerator
AsyncIO 

Enable or disable the asynchronous I/O mode of the socket.

NonBlockingIO 

Mark the socket as nonblocking.

DataToRead 

Return the number of bytes available for reading.

OobDataRead 

Return information about out-of-band data waiting to be received.

AssociateHandle 

Associate this socket with the specified handle of a companion interface.

EnableCircularQueuing 

Replace the oldest queued datagram with an incoming one when the incoming message queues are full.

Flush 

Discards current contents of the sending queue associated with this socket.

GetBroadcastAddress 

Return a SOCKADDR structure that contains the broadcast address for the address family of the current socket.

GetExtensionFunctionPointer 

Retrieve a pointer to the specified extension function supported by the associated service provider.

GetQos 

Retrieve the QOS structure associated with the socket.

GetGroupQos 

Return the QOS attributes for the socket group.

MultipointLoopback 

Control whether data sent by an application on the local computer (not necessarily by the same socket) in a multicast session will be received by a socket joined to the multicast destination group on the loopback interface.

MulticastScope 

Control the number of times a multicast packet can be forwarded by a router, also known as TTL, or hop count.

SetQos 

Set the QOS attributes for the socket.

SetGroupQos 

Set the QOS attributes for the socket group.

TranslateHandle 

Return a handle for the socket that is valid in the context of a companion interface.

RoutingInterfaceQuery 

Return the interface addresses that can be used to connect to the specified remote address.

RoutingInterfaceChange 

Enable receiving a notification when the local interface used to access a remote endpoint changes.

AddressListQuery 

Return the list of the local interfaces that the socket can bind to.

AddressListChange 

Enable receiving a notification when the list of the local interfaces for the socket's protocol family changes.

QueryTargetPnpHandle 

Retrieve the underlying provider's SOCKET handle.

NamespaceChange 

Control whether the socket receives notification when a namespace query becomes invalid.

AddressListSort 

Sort a list of IPv6 and IPv4 destination addresses to determine the best available address for making a connection.

ReceiveAll 

Enable receiving all IPv4 packets on the network.

ReceiveAllMulticast 

Enable receiving all multicast IPv4 packets on the network.

ReceiveAllIgmpMulticast 

Enable receiving all IGMP packets on the network.

KeepAliveValues 

Control sending TCP keep-alive packets and the interval at which they are sent.

AbsorbRouterAlert 

This value is equal to the Winsock 2 'SIO_ABSORB_RTRALERT' constant.

UnicastInterface 

Set the interface used for the outgoing unicast packets.

LimitBroadcasts 

This value is equal to the Winsock 2 'SIO_LIMIT_BROADCASTS' constant.

BindToInterface 

Bind the socket to a specified interface index.

MulticastInterface 

Set the interface used for the outgoing multicast packets.

AddMulticastGroupOnInterface 

Join a multicast group using an interface identified by its index.

DeleteMulticastGroupFromInterface 

Remove the socket from a multicast group.

◆ ProtocolFamily

Enumerates the protocol families.

Enumerator
Unknown 

An unknown protocol.

Unspecified 

An unspecified protocol.

Unix 

The Unix local to host protocol.

InterNetwork 

IPv4.

ImpLink 

The ARPANET IMP protocol.

Pup 

The PUP protocol.

Chaos 

The MIT CHAOS protocol.

NS 

The Xerox NS protocol.

Ipx 

The IPX or SPX protocol.

Iso 

The ISO protocol.

Osi 

The OSI protocol.

Ecma 

The European Computer Manufacturers Association (ECMA) protocol.

DataKit 

The DataKit protocol.

Ccitt 

The CCITT protocol, such as X.25.

Sna 

The IBM SNA protocol.

DecNet 

The DECNet protocol.

DataLink 

The direct data link protocol.

Lat 

The LAT protocol.

HyperChannel 

The NSC HyperChannel protocol.

AppleTalk 

The AppleTalk protocol.

NetBios 

The NetBIOS protocol.

VoiceView 

The VoiceView protocol.

FireFox 

The FireFox protocol.

Banyan 

The Banyan protocol.

Atm 

The native ATM services protocol.

InterNetworkV6 

IPv6.

Cluster 

The Microsoft Cluster products protocol.

Ieee12844 

The IEEE 1284.4 workgroup protocol.

Irda 

The IrDA protocol.

NetworkDesigners 

The Network Designers OSI gateway enabled protocol.

Max 

The MAX protocol.

◆ ProtocolType

Enumerates the protocol types.

Enumerator
IP 

The Internet Protocol.

IPv6HopByHopOptions 

The IPv6 Hop by Hop Options header.

Icmp 

The Internet Control Message Protocol.

Igmp 

The Internet Group Management Protocol.

Ggp 

The Gateway To Gateway Protocol.

IPv4 

The Internet Protocol version 4.

Tcp 

The Transmission Control Protocol.

Pup 

The PARC Universal Packet Protocol.

Udp 

The User Datagram Protocol.

Idp 

The Internet Datagram Protocol.

IPv6 

The Internet Protocol version 6.

IPv6RoutingHeader 

The IPv6 Routing header.

IPv6FragmentHeader 

The IPv6 Fragment header.

IPSecEncapsulatingSecurityPayload 

The IPv6 Encapsulating Security Payload header.

IPSecAuthenticationHeader 

The IPv6 Authentication header.

IcmpV6 

The Internet Control Message Protocol for IPv6.

IPv6NoNextHeader 

The IPv6 No next header.

IPv6DestinationOptions 

The IPv6 Destination Options header.

ND 

The Net Disk protocol.

Raw 

The Raw IP packet protocol.

Unspecified 

An unspecified protocol.

Ipx 

The Internet Packet Exchange protocol.

Spx 

The Sequenced Packet Exchange protocol.

SpxII 

The Sequenced Packet Exchange version 2 protocol.

Unknown 

An unknown protocol.

◆ SelectMode

Specifies the mode for polling the status of the socket.

Enumerator
SelectRead 

The 'read' status mode.

SelectWrite 

The 'write' status mode.

SelectError 

The 'error' status mode.

◆ SocketError

Enumerates the socket error types.

Enumerator
Success 

A socket operation completed successfully.

SocketError 

An unspecified socket error occurred.

Interrupted 

A blocking socket call is cancelled.

AccessDenied 

Access to a socket is denied.

Fault 

An invalid pointer address is detected.

InvalidArgument 

An invalid argument is provided.

TooManyOpenSockets 

There are too many open sockets in the underlying socket provider.

WouldBlock 

An operation cannot be immediately completed on a non-blocking socket.

InProgress 

A blocking operation is in progress.

AlreadyInProgress 

A non-blocking socket already has a running operation.

NotSocket 

An attempt to call a socket operation on non-socket.

DestinationAddressRequired 

A required address is omitted from a socket operation.

MessageSize 

A datagram is too long.

ProtocolType 

A protocol type is not supported by this socket.

ProtocolOption 

An unknown, invalid, or unsupported option or level is used.

ProtocolNotSupported 

A protocol is not implemented or not configured.

SocketNotSupported 

An address family doesn't support the specified socket.

OperationNotSupported 

A protocol family doesn't support an address family.

ProtocolFamilyNotSupported 

A protocol family is not implemented or not configured.

AddressFamilyNotSupported 

The specified address family is not supported.

AddressAlreadyInUse 

An address can be used only once.

AddressNotAvailable 

The selected IP address is not valid in this context.

NetworkDown 

The network is not available.

NetworkUnreachable 

No route to the remote host exists.

NetworkReset 

An application tried to set 'Keep-Alive' on a connection that has already timed out.

ConnectionAborted 

A connection is aborted.

ConnectionReset 

A connection is reset by a remote peer.

NoBufferSpaceAvailable 

No free buffer space is available for a socket operation.

IsConnected 

A socket is already connected.

NotConnected 

An application tried to send or receive data, and a socket is not connected.

Shutdown 

A request to send or receive data is forbidden because the socket has already been closed.

TimedOut 

A connection attempt timed out, or a connected host has failed to respond.

ConnectionRefused 

A remote host is actively refusing a connection.

HostDown 

An operation failed because a remote host is down.

HostUnreachable 

No network route to the specified host exists.

ProcessLimit 

Too many processes are using the underlying socket provider.

SystemNotReady 

A network subsystem is unavailable.

VersionNotSupported 

A version of the underlying socket provider is out of range.

NotInitialized 

The underlying socket provider is not initialized.

Disconnecting 

A graceful shutdown is in progress.

TypeNotFound 

The specified class is not found.

HostNotFound 

The specified host is unknown.

TryAgain 

A name of a host cannot be resolved.

NoRecovery 

An error is unrecoverable or a requested database cannot be located.

NoData 

A requested name or IP address is not found on the name server.

◆ SocketFlags

Provides constant values for the socket messages.

Enumerator
None 

There are no flags used for this call.

OutOfBand 

The out-of-band data is being processed.

Peek 

Peek at an incoming message.

DontRoute 

Send a message without using routing tables.

Truncated 

A message is too large to fit into the specified buffer. It has been truncated.

ControlDataTruncated 

The control data is greater than 64 KB and doesn't fit into the internal buffer. It has been truncated.

Broadcast 

A broadcast packet.

Multicast 

A multicast packet.

Partial 

A message sent or received partially.

◆ SocketOptionLevel

Defines socket option levels for the 'Socket' class.

Enumerator
Socket 

The specified socket options apply to all sockets.

IP 

The specified socket options apply to the IP sockets.

IPv6 

The specified socket options apply to the IPv6 sockets.

Tcp 

The specified socket options apply to the TCP sockets.

Udp 

The specified socket options apply to the UDP sockets.

◆ SocketOptionName

Defines socket option names for the Socket class.

Enumerator
Debug 

Record debugging information.

AcceptConnection 

Indicates if a socket is listening for an incoming connection.

ReuseAddress 

Indicates if a socket can be bound to the address that is already in use.

KeepAlive 

Enables the 'Keep-Alive' packets for a socket connection.

DontRoute 

Indicates if a packet is sent directly to the interface addresses.

Broadcast 

Indicates if a socket can send the broadcast messages.

UseLoopback 

Bypass hardware when possible.

Linger 

The system will block the process on the close attempt until it is able to transmit the data.

OutOfBandInline 

Receives out-of-band data in the normal data stream.

DontLinger 

Indicates if a socket will be closed without lingering.

ExclusiveAddressUse 

A socket will use the bound address exclusively.

SendBuffer 

Specifies the send buffer size.

ReceiveBuffer 

Specifies the receive buffer size.

SendLowWater 

Specifies the minimum amount of data for the send operations.

ReceiveLowWater 

Specifies the minimum amount of data for the receive operations.

SendTimeout 

Specifies the timeout for the synchronous send operations.

ReceiveTimeout 

Specifies the timeout for the synchronous receive operations.

Error 

Returns the error status and clear.

Type 

Returns a socket type.

ReuseUnicastPort 

Indicates if the system should defer the ephemeral port allocation for the outbound connections.

MaxConnections 

This option is not supported. It was used to specify the maximum queue length for listening.

IPOptions 

Specifies the IP option that must be inserted to outgoing datagrams.

HeaderIncluded 

The header is included to outgoing datagrams.

TypeOfService 

Change the IP header type of the service field.

IpTimeToLive 

The IP time to live.

MulticastInterface 

Set the interface for the outgoing multicast packets.

MulticastTimeToLive 

The IP multicast time to live.

MulticastLoopback 

The IP Multicast loopback.

AddMembership 

Add an IP group membership.

DropMembership 

Drop an IP group membership.

DontFragment 

Don't fragment the IP datagrams.

AddSourceMembership 

Join the IP group/source.

DropSourceMembership 

Drop the IP group/source.

BlockSource 

Block the IP group/source.

UnblockSource 

Unblock the IP group/source.

PacketInformation 

Receive packet information for IPv4.

HopLimit 

Delivers an integer containing the HOP count of the packet.

IPProtectionLevel 

Enables restriction of an IPv6 socket to the specified scope.

IPv6Only 

The socket is restricted to send and receive IPv6 packets only.

NoDelay 

Disables the Nagle algorithm for coalescing the send packets.

BsdUrgent 

Use the urgent data as defined in RFC-1222.

Expedited 

Use the expedited data as defined in RFC-1222.

NoChecksum 

Send the UDP datagrams with a checksum set to zero.

ChecksumCoverage 

Set or get the UDP checksum coverage.

UpdateAcceptContext 

Updates a client socket with the same properties of a listening socket.

UpdateConnectContext 

Updates a client socket with the same properties of a listening socket.

◆ SocketShutdown

Defines constants used by the Socket.Shutdown method.

Enumerator
Receive 

Disables the socket for receiving.

Send 

Disables the socket for sending.

Both 

Disables the socket for both sending and receiving.

◆ SocketType

Enumerates the socket types.

Enumerator
Stream 

The type that supports reliable, two-way, connection-based byte streams without duplication of data and without preservation of boundaries.

Dgram 

The type that supports datagrams, which are connectionless, unreliable messages of a fixed maximum length.

Raw 

The type that supports access to the underlying transport protocol.

Rdm 

The type that supports connectionless, message-oriented, reliably delivered messages, and preserves message boundaries in data.

Seqpacket 

The type that provides connection-oriented and reliable two-way transfer of ordered byte streams across a network.

Unknown 

An unknown type.

Function Documentation

◆ DECLARE_ENUM_OPERATORS() [1/2]

System::Net::Sockets::DECLARE_ENUM_OPERATORS ( System::Net::Sockets::AddressFamily  )

Declaration of template arithmetic operators for values of the AddressFamily enum type.

◆ DECLARE_ENUM_OPERATORS() [2/2]

System::Net::Sockets::DECLARE_ENUM_OPERATORS ( System::Net::Sockets::SocketFlags  )

Declaration of template arithmetic operators for values of the SocketFlags enum type.

◆ operator!=()

bool System::Net::Sockets::operator!= ( IPPacketInformation  left,
IPPacketInformation  right 
)

◆ operator==()

bool System::Net::Sockets::operator== ( IPPacketInformation  left,
IPPacketInformation  right 
)