DatagramSocketControl.OutboundUnicastHopLimit | outboundUnicastHopLimit property

Applies to Windows and Windows Phone

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.

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 (HTML)
How to use advanced socket controls (XAML)
Reference
DatagramSocket
DatagramSocketControl

 

 

Show:
© 2014 Microsoft