KeepAlive Property
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Gets a Boolean value that indicates whether the client requests a persistent connection.
Namespace: System.Net
Assembly: System.Http (in System.Http.dll)
Syntax
'Declaration
Public ReadOnly Property KeepAlive As Boolean
public bool KeepAlive { get; }
public:
property bool KeepAlive {
bool get ();
}
member KeepAlive : bool with get
function get KeepAlive () : boolean
Property Value
Type: System. . :: . .Boolean
true if the connection should be kept open; otherwise, false.
Remarks
If an HTTP client and server expect to exchange data multiple times in a short time period, a persistent connection speeds up their communications by allowing them to avoid the overhead required to open and close a TCP connection for each message. For clients using HTTP/1.1, the default value for this property is true.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.