HubConnectionBuilderExtensions.WithKeepAliveInterval 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
为 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 实例。