HttpTransportBindingElement.KeepAliveEnabled 속성

정의

서비스 엔드포인트에 영구적으로 연결할 것인지 여부를 나타내는 값을 가져오거나 설정합니다.

public:
 property bool KeepAliveEnabled { bool get(); void set(bool value); };
public bool KeepAliveEnabled { get; set; }
member this.KeepAliveEnabled : bool with get, set
Public Property KeepAliveEnabled As Boolean

속성 값

Boolean

서비스 엔드포인트에 대한 요청의 Connection HTTP 헤더 값이 true이면 Keep-alive이고, 그렇지 않으면 false입니다. 기본값은 true입니다.

예제

다음 코드에서는 이 속성을 설정하는 방법을 보여 줍니다.

HttpTransportBindingElement transport = new HttpTransportBindingElement();
transport.ManualAddressing = true;
transport.KeepAliveEnabled = keepAliveEnabled;

설명

Keep-alive이 있는 연결 HTTP 헤더를 보내도록 true 이 속성을 설정합니다. 클라이언트는 이 속성을 사용하여 영구 연결에 대한 기본 설정을 나타냅니다. 이 속성이면 true서비스 엔드포인트에서 지원하는 경우 클라이언트가 서비스 엔드포인트에 연결하는 연결이 지속됩니다.

적용 대상