SocketsHttpHandler.KeepAlivePingDelay Property

Definition

Gets or sets the keep alive ping delay.

C#
public TimeSpan KeepAlivePingDelay { get; set; }

Property Value

The keep alive ping delay. Defaults to InfiniteTimeSpan.

Remarks

The client will send a keep alive ping to the server if it doesn't receive any frames on a connection for this period of time. This property is used together with KeepAlivePingTimeout to check whether the connection is broken.

Delay value must be greater than or equal to 1 second. Set to InfiniteTimeSpan to disable the keep alive ping.

Applies to

Product Versions
.NET 5, 6, 7, 8, 9, 10