Freigeben über


JsonRpc.SendAsync(JsonRpcMessage, CancellationToken) Method

Definition

Sends the JSON-RPC message to IJsonRpcMessageHandler intance to be transmitted.

protected virtual System.Threading.Tasks.ValueTask SendAsync(StreamJsonRpc.Protocol.JsonRpcMessage message, System.Threading.CancellationToken cancellationToken);
abstract member SendAsync : StreamJsonRpc.Protocol.JsonRpcMessage * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
override this.SendAsync : StreamJsonRpc.Protocol.JsonRpcMessage * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
Protected Overridable Function SendAsync (message As JsonRpcMessage, cancellationToken As CancellationToken) As ValueTask

Parameters

message
JsonRpcMessage

The message to send.

cancellationToken
CancellationToken

A token to cancel the send request.

Returns

A task that represents the asynchronous operation.

Remarks

Overrides of this method are expected to call this base method for core functionality. Overrides should call the base method before any yielding await in order to maintain consistent message ordering unless the goal of the override is specifically to alter ordering of outgoing messages.

Applies to