StreamSocketControl.KeepAlive Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A value that indicates whether keep-alive packets are sent to the remote destination on a StreamSocket object.
public:
property bool KeepAlive { bool get(); void set(bool value); };
bool KeepAlive();
void KeepAlive(bool value);
public bool KeepAlive { get; set; }
var boolean = streamSocketControl.keepAlive;
streamSocketControl.keepAlive = boolean;
Public Property KeepAlive As Boolean
Property Value
bool
Whether keep-alive packets are sent to the remote destination.
Windows requirements
App capabilities |
ID_CAP_NETWORKING [Windows Phone]
|
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.
For more detailed information, see the SO_KEEPALIVE socket option in the Windows Sockets documentation.