HubConnection.SendCoreAsync(String, Object[], CancellationToken) Method

Definition

Invokes a hub method on the server using the specified method name and arguments. Does not wait for a response from the receiver.

public System.Threading.Tasks.Task SendCoreAsync (string methodName, object[] args, System.Threading.CancellationToken cancellationToken = default);
public virtual System.Threading.Tasks.Task SendCoreAsync (string methodName, object?[] args, System.Threading.CancellationToken cancellationToken = default);
member this.SendCoreAsync : string * obj[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task
abstract member SendCoreAsync : string * obj[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.SendCoreAsync : string * obj[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function SendCoreAsync (methodName As String, args As Object(), Optional cancellationToken As CancellationToken = Nothing) As Task
Public Overridable Function SendCoreAsync (methodName As String, args As Object(), Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

methodName
String

The name of the server method to invoke.

args
Object[]

The arguments used to invoke the server method.

cancellationToken
CancellationToken

The token to monitor for cancellation requests. The default value is None.

Returns

A Task that represents the asynchronous invoke.

Remarks

This is a low level method for invoking a hub method on the server. Using an HubConnectionExtensionsSendAsync extension method is recommended.

Applies to