WebSocket.SendAsync Method (ArraySegment<Byte>, WebSocketMessageType, Boolean, CancellationToken)
.NET Framework (current version)
Sends data over the WebSocket connection asynchronously.
Assembly: System (in System.dll)
abstract SendAsync : buffer:ArraySegment<byte> * messageType:WebSocketMessageType * endOfMessage:bool * cancellationToken:CancellationToken -> Task
Parameters
- buffer
-
Type:
System.ArraySegment<Byte>
The buffer to be sent over the connection.
- messageType
-
Type:
System.Net.WebSockets.WebSocketMessageType
Indicates whether the application is sending a binary or text message.
- endOfMessage
-
Type:
System.Boolean
Indicates whether the data in “buffer” is the last part of a message.
- cancellationToken
-
Type:
System.Threading.CancellationToken
The token that propagates the notification that operations should be canceled.
Return Value
Type: System.Threading.Tasks.TaskThe task object representing the asynchronous operation.
.NET Framework
Available since 4.5
Available since 4.5
Show: