IHubConnectionBuilder 介面

定義

用於設定 HubConnection 執行個體的建立器抽象概念。

public interface class IHubConnectionBuilder : Microsoft::AspNetCore::SignalR::ISignalRBuilder
public interface IHubConnectionBuilder : Microsoft.AspNetCore.SignalR.ISignalRBuilder
type IHubConnectionBuilder = interface
    interface ISignalRBuilder
Public Interface IHubConnectionBuilder
Implements ISignalRBuilder
衍生
實作

屬性

Services

取得建立器服務集合。

(繼承來源 ISignalRBuilder)

方法

Build()

建立 HubConnection

擴充方法

ConfigureLogging(IHubConnectionBuilder, Action<ILoggingBuilder>)

新增用於設定所提供 ILoggingBuilder 的委派。 可能會多次呼叫此項。

WithAutomaticReconnect(IHubConnectionBuilder)

設定 , HubConnection 以在連線遺失時自動嘗試重新連線。 用戶端會分別等候預設的 0、2、10 和 30 秒,再嘗試最多四次重新連線嘗試。

WithAutomaticReconnect(IHubConnectionBuilder, IRetryPolicy)

設定 , HubConnection 以在連線遺失時自動嘗試重新連線。

WithAutomaticReconnect(IHubConnectionBuilder, TimeSpan[])

設定 , HubConnection 以在連線遺失時自動嘗試重新連線。

WithKeepAliveInterval(IHubConnectionBuilder, TimeSpan)

設定 的 KeepAliveInterval HubConnection

WithServerTimeout(IHubConnectionBuilder, TimeSpan)

設定 的 HubConnection ServerTimeout。

WithStatefulReconnect(IHubConnectionBuilder)

HttpConnectionOptions 設定為與伺服器交涉具狀態重新連線。

WithUrl(IHubConnectionBuilder, String)

HubConnection 設定為使用 HTTP 型傳輸來連線到指定的 URL。

WithUrl(IHubConnectionBuilder, String, HttpTransportType)

HubConnection 設定為使用 HTTP 型傳輸來連線到指定的 URL 和傳輸。

WithUrl(IHubConnectionBuilder, String, HttpTransportType, Action<HttpConnectionOptions>)

HubConnection 設定為使用 HTTP 型傳輸來連線到指定的 URL 和傳輸。

WithUrl(IHubConnectionBuilder, String, Action<HttpConnectionOptions>)

HubConnection 設定為使用 HTTP 型傳輸來連線到指定的 URL。

WithUrl(IHubConnectionBuilder, Uri)

HubConnection 設定為使用 HTTP 型傳輸來連線到指定的 URL。

WithUrl(IHubConnectionBuilder, Uri, HttpTransportType)

HubConnection 設定為使用 HTTP 型傳輸來連線到指定的 URL 和傳輸。

WithUrl(IHubConnectionBuilder, Uri, HttpTransportType, Action<HttpConnectionOptions>)

HubConnection 設定為使用 HTTP 型傳輸來連線到指定的 URL 和傳輸。

WithUrl(IHubConnectionBuilder, Uri, Action<HttpConnectionOptions>)

HubConnection 設定為使用 HTTP 型傳輸來連線到指定的 URL。

WithMessagePackProtocol(IHubConnectionBuilder)

用於設定 HubConnection 執行個體的建立器抽象概念。

WithMessagePackProtocol(IHubConnectionBuilder, MessagePackHubProtocolOptions)

用於設定 HubConnection 執行個體的建立器抽象概念。

AddMessagePackProtocol(ISignalRBuilder)

啟用 SignalR 的 MsgPack 通訊協定。

AddMessagePackProtocol(ISignalRBuilder, Action<MessagePackHubProtocolOptions>)

啟用 SignalR 的 MsgPack 通訊協定,並允許設定 MsgPack 通訊協定的選項。

適用於