AspNetWebSocket::SendAsync Method (ArraySegment<Byte>, WebSocketMessageType, Boolean, CancellationToken)
.NET Framework (current version)
Sends a single message fragment to a remote client.
Assembly: System.Web (in System.Web.dll)
public: virtual Task^ SendAsync( ArraySegment<unsigned char> buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken ) override
Parameters
- buffer
-
Type:
System::ArraySegment<Byte>
The array that contains the message data.
- messageType
-
Type:
System.Net.WebSockets::WebSocketMessageType
The message type.
- endOfMessage
-
Type:
System::Boolean
true to indicate that a fragment is the end of a complete message; otherwise, false.
- cancellationToken
-
Type:
System.Threading::CancellationToken
The object that cancels a pending operation.
| Exception | Condition |
|---|---|
| ObjectDisposedException | The AspNetWebSocket object is disposed. |
| System::InvalidOperationException |
.NET Framework
Available since 4.5
Available since 4.5
Show: