Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
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.OutboundUnicastHopLimit | outboundUnicastHopLimit property

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

Syntax


var outboundUnicastHopLimit = datagramSocketControl.outboundUnicastHopLimit;
datagramSocketControl.outboundUnicastHopLimit = outboundUnicastHopLimit;

Property value

Type: Number [JavaScript] | System.Byte [.NET] | uint8 [C++]

The hop limit on an outbound packet sent by the DatagramSocket object. The default is 128.

Remarks

This OutboundUnicastHopLimit property is the hop limit set on an outbound datagram packet sent to a unicast IP address using the DatagramSocket object. This property is used to set the Time to Live (TTL) field in an IPv4 packet header. This property is used to set the Hop Limit field in an IPv6 header. The default value for this property is 128.

This 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.

Setting the OutboundUnicastHopLimit may throw an exception if the system doesn't support setting the TTL.

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.UniversalApiContract.winmd

Capabilities

ID_CAP_NETWORKING [Windows Phone]

Requirements (Windows 8.x and Windows Phone 8.x)

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

Capabilities

ID_CAP_NETWORKING [Windows Phone]

See also

Other resources
How to use advanced socket controls (HTML)
How to use advanced socket controls (XAML)
Reference
DatagramSocket
DatagramSocketControl

 

 

Show:
© 2015 Microsoft