Send data on System.Net.WebSockets.ClientWebSocket as an asynchronous operation.
- buffer
The buffer containing the message to be sent.
- messageType
Specifies whether the buffer is clear text or in a binary format.
- endOfMessage
Specifies whether this is the final asynchronous send. Set to true if this is the final send; false otherwise.
- cancellationToken
A cancellation token used to propagate notification that this operation should be canceled.
![]()
Returns System.Threading.Tasks.Task.
The task object representing the asynchronous operation.
This operation will not block. The returned System.Threading.Tasks.Task object will complete after the send request on the System.Net.WebSockets.ClientWebSocket instance has completed.