WebSocket.SendAsync Method (ArraySegment(Of Byte), WebSocketMessageType, Boolean, CancellationToken)
.NET Framework (current version)
Sends data over the WebSocket connection asynchronously.
Assembly: System (in System.dll)
Public MustOverride Function SendAsync ( buffer As ArraySegment(Of Byte), messageType As WebSocketMessageType, endOfMessage As Boolean, cancellationToken As CancellationToken ) As Task
Parameters
- buffer
-
Type:
System.ArraySegment(Of 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: