Skip to main content
StreamSocketControl.OutboundUnicastHopLimit | outboundUnicastHopLimit property

The hop limit on an outbound packet sent to a unicast IP address by the StreamSocket object.

Syntax


var outboundUnicastHopLimit = streamSocketControl.outboundUnicastHopLimit;
streamSocketControl.outboundUnicastHopLimit = outboundUnicastHopLimit;

public byte OutboundUnicastHopLimit { get; set; }

Public Property OutboundUnicastHopLimit As Byte

public:
property unsigned char OutboundUnicastHopLimit { 
   unsigned char get();
   void set (unsigned char value);
}

Property value

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

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

Remarks

This value indicates the hop limit that is set on an outbound TCP packet sent to a unicast IP address using the StreamSocket 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 may be set before the StreamSocket is connected. After the StreamSocket is connected, setting this property will result in an error.

Setting the OutboundUnicastHopLimit may not have an effect if the system doesn't support setting the TTL.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.UniversalApiContract.winmd

Capabilities

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
StreamSocket
StreamSocketControl