Provides the ability to send a WebSocket protocol keep-alive on a connected WebSocket.
The WebSocketKeepAlive class has these types of members:
The WebSocketKeepAlive class has these constructors.
|WebSocketKeepAlive||Creates a new WebSocketKeepAlive object.|
The WebSocketKeepAlive class has these methods. It also inherits methods from the Object class.
|Run||Sends a WebSocket protocol keep-alive on a connected WebSocket.|
The WebSocketKeepAlive class is used in conjunction with the ControlChannelTrigger class and related interfaces to enable real-time network status and triggers for the StreamWebSocket and MessageWebSocket classes. Control channel triggers are used by long-running network apps to minimize network and system resource usage. Network triggers allow an app to drop to a low-power mode for periods of time while still keeping established network connections intact but in a low-power state. An app can set a keep-alive trigger used by the system for when the app should wake up and send a WebSocket keep-alive packet.
A Windows Store app is normally suspended when it is no longer in the foreground. There are some exceptions where an app should not be suspended (actively printing, accessing an audio stream, and transferring files in the background, for example). The ControlChannelTrigger class allows a network app that has established a WebSocket connection to notify the system that the network connection should be kept operational and that the system should wake up the suspended app when network data is received for the app or to send a WebSocket keep-alive packet.
For more information about suspending and waking up an app, How to set background connectivity options.
For more information on the WebSocket keep-alive control frames, see the WebSocket Protocol.
Minimum supported client
|Windows 8 [Windows Store apps only]|
Minimum supported server
|Windows Server 2012 [Windows Store apps only]|
Build date: 11/16/2013