DatagramSocket.Control | control property

Applies to Windows and Windows Phone

Gets socket control data on a DatagramSocket object.

Syntax


var control = datagramSocket.control;

Property value

Type: DatagramSocketControl

Socket control data on a DatagramSocket object.

Remarks

The Control property gets the DatagramSocketControl instance associated with a DatagramSocket object. A DatagramSocketControl object is automatically created with the parent DatagramSocket object. The DatagramSocketControl instance can then be used to get or set control data used by the DatagramSocket. These properties on the DatagramSocketControl instance include the following:

The OutboundUnicastHopLimit property can be set before or after the DatagramSocket is bound or connected. Before changing this value on a bound or connected DatagramSocket, any outgoing packets should first be flushed to ensure that all previously-written data is sent out with the previous hop limit.

Any changes to the other property values on the DatagramSocketControl must be set before the DatagramSocket is bound or connected. As a result if you need to make changes to the DontFragment, InboundBufferSizeInBytes, or QualityOfService properties, then these changes must occur before a successful call to the BindEndpointAsync, BindServiceNameAsync, or one of the ConnectAsync methods on the DatagramSocket.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

Windows.Networking.Sockets
Windows::Networking::Sockets [C++]

Metadata

Windows.winmd

DLL

Windows.Networking.dll

Capabilities

ID_CAP_NETWORKING [Windows Phone]

See also

Other resources
How to use advanced socket controls
Reference
DatagramSocket
DatagramSocketControl
DontFragment
InboundBufferSizeInBytes
OutboundUnicastHopLimit
QualityOfService

 

 

Show:
© 2014 Microsoft