SocketsHttpHandler.KeepAlivePingTimeout 屬性

定義

取得或設定 keep alive ping 逾時。

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

屬性值

保持運作 Ping 逾時。 預設值為20秒。

備註

當非活動期間超過設定 KeepAlivePingDelay 的值時,就會傳送保持作用中的 Ping。 如果用戶端未在逾時內收到任何畫面格,用戶端將會關閉連線。

逾時必須大於或等於1秒。 設定為 InfiniteTimeSpan 以停用保持運作 Ping 逾時。

適用於