Share via


WebSocketMessageHandler.ReadCoreAsync(CancellationToken) Method

Definition

Reads a distinct and complete message, waiting for one if necessary.

protected override System.Threading.Tasks.Task<string> ReadCoreAsync (System.Threading.CancellationToken cancellationToken);
protected override System.Threading.Tasks.ValueTask<StreamJsonRpc.Protocol.JsonRpcMessage> ReadCoreAsync (System.Threading.CancellationToken cancellationToken);
protected override System.Threading.Tasks.ValueTask<StreamJsonRpc.Protocol.JsonRpcMessage?> ReadCoreAsync (System.Threading.CancellationToken cancellationToken);
override this.ReadCoreAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
override this.ReadCoreAsync : System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<StreamJsonRpc.Protocol.JsonRpcMessage>
Protected Overrides Function ReadCoreAsync (cancellationToken As CancellationToken) As Task(Of String)
Protected Overrides Function ReadCoreAsync (cancellationToken As CancellationToken) As ValueTask(Of JsonRpcMessage)

Parameters

cancellationToken
CancellationToken

A token to cancel the read request.

Returns

A task whose result is the received message. A null string indicates the stream has ended. An empty string should never be returned.

Applies to