HubConnectionBuilderExtensions.WithKeepAliveInterval 方法

定义

HubConnection配置 KeepAliveInterval。

public static Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder WithKeepAliveInterval (this Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder hubConnectionBuilder, TimeSpan interval);
static member WithKeepAliveInterval : Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder * TimeSpan -> Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder
<Extension()>
Public Function WithKeepAliveInterval (hubConnectionBuilder As IHubConnectionBuilder, interval As TimeSpan) As IHubConnectionBuilder

参数

hubConnectionBuilder
IHubConnectionBuilder

要配置的 IHubConnectionBuilder

interval
TimeSpan

HubConnectionKeepAliveInterval。

返回

用于链接的相同 IHubConnectionBuilder 实例。

适用于