HttpListenerTimeoutManager.IdleConnection 屬性

定義

取得或設定閒置連接的允許時間。

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

屬性值

閒置連線所允許的時間。

備註

此屬性的預設值為 2 分鐘。

只有在連線上的第一個要求路由傳送至 HttpListener 之後,才會強制執行此逾時。

在剖析標頭之前,系統無法判斷要求相關聯的要求佇列或 URL 群組。 因此,會在 HttpListener 連線上針對第一個要求強制執行預設 IdleConnection 計時器。 Keep-Alive連線上的後續要求將會使用此屬性上設定的值。

適用於