WebSocket::SendAsync Method (ArraySegment<Byte>, WebSocketMessageType, Boolean, CancellationToken)
.NET Framework (current version)
Sends data over the WebSocket connection asynchronously.
Assembly: System (in System.dll)
public: virtual Task^ SendAsync( ArraySegment<unsigned char> buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken ) abstract
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::Task^The task object representing the asynchronous operation.
.NET Framework
Available since 4.5
Available since 4.5
Show: