Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DatagramSocketControl class

Applies to Windows and Windows Phone

Provides socket control data on a DatagramSocket object.

Syntax

Public NotInheritable Class DatagramSocketControl

Attributes

[DualApiPartition()]
[MarshalingBehavior(Agile)]
[Version(0x06020000)]

Members

The DatagramSocketControl class has these types of members:

Methods

The DatagramSocketControl class inherits methods from the Object class (C#/VB/C++).

Properties

The DatagramSocketControl class has these properties.

PropertyAccess typeDescription

DontFragment

Read/writeGets or sets a Boolean value that specifies whether the DatagramSocket allows IP datagrams for UDP to be fragmented.

InboundBufferSizeInBytes

Read/writeGet or set the size, in bytes, of the buffer used for receiving data on the DatagramSocket object.

OutboundUnicastHopLimit

Read/writeGets or sets the hop limit on an outbound packet sent to a unicast IP address by the DatagramSocket object.

QualityOfService

Read/writeGets or sets the quality of service on a DatagramSocket object.

 

Remarks

The DatagramSocketControl class provides access to advanced socket control data on a DatagramSocket object.

A DatagramSocketControl object is automatically created with the parent DatagramSocket object. The DatagramSocket.Control property provides access to the associated DatagramSocketControl object.

The following example creates a DatagramSocket, and then demonstrates how to set the QualityOfService property to LowLatency. Other properties may be set in a similar manner. After this is done, the app can connect the DatagramSocket or send data on the socket.

No code example is currently available or this language may not be supported.

Requirements

Minimum supported client

Windows 8 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 [Windows Store apps, desktop apps]

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 (Windows Store apps using JavaScript and HTML)
How to use advanced socket controls (Windows Store apps using C#/VB/C++ and XAML)
Reference
DatagramSocket
DatagramSocket.Control
Object
Samples
DatagramSocket sample

 

 

Show:
© 2014 Microsoft. All rights reserved.