SocketFlags Enumeration
Specifies flags that control socket behavior during send and receive operations.
This enumeration is used with the Socket class methods, such as Send and Receive, to modify their default behavior.
Syntax
public enum SocketFlags
Members
-
NoneSpecifies that no flags are set. This is the default behavior.
-
OutOfBandSpecifies that out-of-band data should be sent or received. Out-of-band data is high-priority data that bypasses normal queuing mechanisms.
-
PeekSpecifies that the data should be read without removing it from the input queue. After a Peek operation, the next receive operation will retrieve the same data.
-
DontRouteSpecifies that the routing table should not be used to determine the output interface or network. This flag is typically used by diagnostic tools or for specific network configurations.
-
BroadcastSpecifies that the data should be sent as a broadcast datagram. This flag is only valid for connectionless sockets that support broadcasting.
-
MulticastSpecifies that the data should be sent as a multicast datagram. This flag is only valid for connectionless sockets that support multicasting.
-
TruncateSpecifies that if the buffer is smaller than the incoming message, the message should be truncated to fit the buffer. The remaining data is discarded.
-
CongestionControlSpecifies that congestion control should be applied. This is a hint to the transport layer to manage traffic flow effectively.
-
DontFragmentSpecifies that the datagram should not be fragmented by intermediate routers. If the datagram is too large to be transmitted without fragmentation, it will be discarded, and an error will be returned.
-
ControlDataSpecifies that control data should be returned with the received data. This can include information like sender address, port, and TTL.
-
SendLifeTimeSpecifies that the send operation should use the socket's configured send lifetime.
-
ReceiveAllSpecifies that all data available in the receive buffer should be retrieved, even if it exceeds the size of the provided buffer. The excess data is not discarded.
-
ReceiveAllNotificationsSpecifies that all pending notifications for the socket should be returned.