Share via


StreamWebSocketControl.DesiredUnsolicitedPongInterval Property

Definition

Allows an app to get and set the desired unsolicited WebSocket PONG interval.

public:
 property TimeSpan DesiredUnsolicitedPongInterval { TimeSpan get(); void set(TimeSpan value); };
TimeSpan DesiredUnsolicitedPongInterval();

void DesiredUnsolicitedPongInterval(TimeSpan value);
public System.TimeSpan DesiredUnsolicitedPongInterval { get; set; }
var timeSpan = streamWebSocketControl.desiredUnsolicitedPongInterval;
streamWebSocketControl.desiredUnsolicitedPongInterval = timeSpan;
Public Property DesiredUnsolicitedPongInterval As TimeSpan

Property Value

System.Timespan

Windows requirements

Device family
Windows 10 Fall Creators Update (introduced in 10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v5.0)

Remarks

This terminology is defined in WebSocket RFC 6455, which is the time between unsolicited Pong control frames sent by the client to the server. The PONG serves as a unidirectional heartbeat and can be used for the client to determine network connection issues.

Note

Setting the DesiredUnsolicitedPongInterval on a StreamWebSocket associated with a ControlChannelTrigger is not supported. Setting the property does not change the actual interval.

Even though a custom unsolicited PONG interval is not supported with a ControlChannelTrigger WebSocket, the ControlChannelTrigger is impacted by two types of keep-alive intervals (1) network keep-alive interval and (2) server keep-alive interval. See ControlChannelTrigger Remarks for details. The server keep-alive interval can be configured through ControlChannelTrigger’s ServerKeepAliveIntervalInMinutes property while implementing application level PONGs.

Applies to