Method SendAsync
SendAsync(ReadOnlyMemory<byte>, WebSocketMessageType, bool, CancellationToken)
Sends data over the WebSocket asynchronously.
public abstract ValueTask SendAsync(ReadOnlyMemory<byte> buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken)
Parameters
buffer
ReadOnlyMemory<byte>The buffer containing the data to send.
messageType
WebSocketMessageTypeThe type of message to send.
endOfMessage
boolA value indicating whether this is the end of the message.
cancellationToken
CancellationTokenThe cancellation token.