Udostępnij za pośrednictwem


DatagramSocketControl.OutboundUnicastHopLimit Property

Definition

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

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

void OutboundUnicastHopLimit(byte value);
public byte OutboundUnicastHopLimit { get; set; }
var byte = datagramSocketControl.outboundUnicastHopLimit;
datagramSocketControl.outboundUnicastHopLimit = byte;
Public Property OutboundUnicastHopLimit As Byte

Property Value

Byte

byte

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

Windows requirements

App capabilities
ID_CAP_NETWORKING [Windows Phone]

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 not have an effect if the system doesn't support setting the TTL.

Applies to

See also