Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

StreamSocketControl.KeepAlive | keepAlive property

Applies to Windows and Windows Phone

A value that indicates whether keep-alive packets are sent to the remote destination on a StreamSocket object.

Syntax


var keepAlive = streamSocketControl.keepAlive;
streamSocketControl.keepAlive = keepAlive;

Property value

Type: Boolean [JavaScript] | System.Boolean [.NET] | Platform::Boolean [C++]

Whether keep-alive packets are sent to the remote destination.

Remarks

When this property is true, the StreamSocket sends keep-alive packets when no data or acknowledgment packets have been received for the TCP connection within an interval. When a StreamSocket is created, the default value for this property is false.

This property may be set before the StreamSocket is connected. After the StreamSocket is connected, setting the property will result in an error.

This property sets the value of the TCP_KEEPALIVE socket option on the TCP socket used by the StreamSocket. For more detailed information, see the SO_KEEPALIVE socket option in the Windows Sockets documentation.

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

 

 

Show:
© 2014 Microsoft