Method | Description | |
---|---|---|
BuildAuthorizeConnect ( Func |
Wraps a function to be called before a client subscribes to signals belonging to the hub described by the HubDescriptor. By default, the AuthorizeModule will look for attributes on the IHub to help determine if the client is authorized to subscribe to method invocations for the described hub. The function returns true if the client is authorized to subscribe to client-side hub method invocations; false, otherwise.
|
|
BuildConnect ( Task>.Func |
Wraps a function that is called when a client connects to the HubDispatcher for each IHub the client connects to. By default, this results in the IHub's OnConnected method being invoked.
|
|
BuildDisconnect ( Func |
Wraps a function that is called when a client disconnects from the HubDispatcher for each IHub the client was connected to. By default, this results in the IHub's OnDisconnected method being invoked.
|
|
BuildIncoming ( Func |
Wraps a function that invokes a server-side hub method. Even if a client has not been authorized to connect to a hub, it will still be authorized to invoke server-side methods on that hub unless it is prevented in IHubPipelineModule.BuildIncoming by not executing the invoke parameter.
|
|
BuildOutgoing ( Task>.Func |
Wraps a function that invokes a client-side hub method.
|
|
BuildReconnect ( Task>.Func |
Wraps a function that is called when a client reconnects to the HubDispatcher for each IHub the client connects to. By default, this results in the IHub's OnReconnected method being invoked.
|
|
BuildRejoiningGroups ( Func |
Wraps a function that determines which of the groups belonging to the hub described by the HubDescriptor the client should be allowed to rejoin. By default, clients will rejoin all the groups they were in prior to reconnecting.
|
Method | Description | |
---|---|---|
OnAfterConnect ( IHub hub ) : void |
This method is called after the connect components of any modules added later to the IHubPipeline are executed and after IHub.OnConnected is executed, if at all.
|
|
OnAfterDisconnect ( IHub hub, bool stopCalled ) : void |
This method is called after the disconnect components of any modules added later to the IHubPipeline are executed and after IHub.OnDisconnected(bool) is executed, if at all.
|
|
OnAfterIncoming ( object result, IHubIncomingInvokerContext context ) : object |
This method is called after the incoming components of any modules added later to the IHubPipeline and the server-side hub method have completed execution.
|
|
OnAfterOutgoing ( IHubOutgoingInvokerContext context ) : void |
This method is called after the outgoing components of any modules added later to the IHubPipeline are executed. This does not mean that all the clients have received the hub method invocation, but it does indicate indicate a hub invocation message has successfully been published to a message bus.
|
|
OnAfterReconnect ( IHub hub ) : void |
This method is called after the reconnect components of any modules added later to the IHubPipeline are executed and after IHub.OnReconnected is executed, if at all.
|
|
OnBeforeAuthorizeConnect ( |
This method is called before the AuthorizeConnect components of any modules added later to the IHubPipeline are executed. If this returns false, then those later-added modules will not run and the client will not be allowed to subscribe to client-side invocations of methods belonging to the hub defined by the HubDescriptor.
|
|
OnBeforeConnect ( IHub hub ) : bool |
This method is called before the connect components of any modules added later to the IHubPipeline are executed. If this returns false, then those later-added modules and the IHub.OnConnected method will not be run.
|
|
OnBeforeDisconnect ( IHub hub, bool stopCalled ) : bool |
This method is called before the disconnect components of any modules added later to the IHubPipeline are executed. If this returns false, then those later-added modules and the IHub.OnDisconnected(bool) method will not be run.
|
|
OnBeforeIncoming ( IHubIncomingInvokerContext context ) : bool |
This method is called before the incoming components of any modules added later to the IHubPipeline are executed. If this returns false, then those later-added modules and the server-side hub method invocation will not be executed. Even if a client has not been authorized to connect to a hub, it will still be authorized to invoke server-side methods on that hub unless it is prevented in IHubPipelineModule.BuildIncoming by not executing the invoke parameter or prevented in HubPipelineModule.OnBeforeIncoming by returning false.
|
|
OnBeforeOutgoing ( IHubOutgoingInvokerContext context ) : bool |
This method is called before the outgoing components of any modules added later to the IHubPipeline are executed. If this returns false, then those later-added modules and the client-side hub method invocation(s) will not be executed.
|
|
OnBeforeReconnect ( IHub hub ) : bool |
This method is called before the reconnect components of any modules added later to the IHubPipeline are executed. If this returns false, then those later-added modules and the IHub.OnReconnected method will not be run.
|
|
OnIncomingError ( |
This is called when an uncaught exception is thrown by a server-side hub method or the incoming component of a module added later to the IHubPipeline. Observing the exception using this method will not prevent it from bubbling up to other modules.
|
public BuildAuthorizeConnect ( Func |
||
authorizeConnect | Func |
/// A function that dictates whether or not the client is authorized to connect to the described Hub. /// |
return | Func |
public BuildConnect ( Task>.Func |
||
connect | Task>.Func | A function to be called when a client connects to a hub. |
return | Task>.Func |
public BuildDisconnect ( Func |
||
disconnect | Func |
/// |
return | Func |
public BuildIncoming ( Func |
||
invoke | Func |
A function that invokes a server-side hub method. |
return | Task |
public BuildOutgoing ( Task>.Func |
||
send | Task>.Func | A function that invokes a client-side hub method. |
return | Task>.Func |
public BuildReconnect ( Task>.Func |
||
reconnect | Task>.Func | A function to be called when a client reconnects to a hub. |
return | Task>.Func |
public BuildRejoiningGroups ( Func |
||
rejoiningGroups | Func |
A function that determines which groups the client should be allowed to rejoin. |
return | Func |
protected OnAfterConnect ( IHub hub ) : void | ||
hub | IHub | The hub the client has connected to. |
return | void |
protected OnAfterDisconnect ( IHub hub, bool stopCalled ) : void | ||
hub | IHub | The hub the client has disconnected from. |
stopCalled | bool | /// true, if stop was called on the client closing the connection gracefully; /// false, if the client timed out. Timeouts can be caused by clients reconnecting to another SignalR server in scaleout. /// |
return | void |
protected OnAfterIncoming ( object result, IHubIncomingInvokerContext context ) : object | ||
result | object | The return value of the server-side hub method |
context | IHubIncomingInvokerContext | A description of the server-side hub method invocation. |
return | object |
protected OnAfterOutgoing ( IHubOutgoingInvokerContext context ) : void | ||
context | IHubOutgoingInvokerContext | A description of the client-side hub method invocation. |
return | void |
protected OnAfterReconnect ( IHub hub ) : void | ||
hub | IHub | The hub the client has reconnected to. |
return | void |
protected OnBeforeAuthorizeConnect ( |
||
hubDescriptor | A description of the hub the client is trying to subscribe to. | |
request | IRequest | The connect request of the client trying to subscribe to the hub. |
return | bool |
protected OnBeforeConnect ( IHub hub ) : bool | ||
hub | IHub | The hub the client has connected to. |
return | bool |
protected OnBeforeDisconnect ( IHub hub, bool stopCalled ) : bool | ||
hub | IHub | The hub the client has disconnected from. |
stopCalled | bool | /// true, if stop was called on the client closing the connection gracefully; /// false, if the client timed out. Timeouts can be caused by clients reconnecting to another SignalR server in scaleout. /// |
return | bool |
protected OnBeforeIncoming ( IHubIncomingInvokerContext context ) : bool | ||
context | IHubIncomingInvokerContext | A description of the server-side hub method invocation. |
return | bool |
protected OnBeforeOutgoing ( IHubOutgoingInvokerContext context ) : bool | ||
context | IHubOutgoingInvokerContext | A description of the client-side hub method invocation. |
return | bool |
protected OnBeforeReconnect ( IHub hub ) : bool | ||
hub | IHub | The hub the client has reconnected to. |
return | bool |
protected OnIncomingError ( |
||
exceptionContext | /// Represents the exception that was thrown during the server-side invocation. /// It is possible to change the error or set a result using this context. /// | |
invokerContext | IHubIncomingInvokerContext | A description of the server-side hub method invocation. |
return | void |