WebSocketStream.CreateWritableMessageStream Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a WebSocketStream that writes a single message to the underlying WebSocket.
public:
static System::Net::WebSockets::WebSocketStream ^ CreateWritableMessageStream(System::Net::WebSockets::WebSocket ^ webSocket, System::Net::WebSockets::WebSocketMessageType writeMessageType);
public static System.Net.WebSockets.WebSocketStream CreateWritableMessageStream(System.Net.WebSockets.WebSocket webSocket, System.Net.WebSockets.WebSocketMessageType writeMessageType);
static member CreateWritableMessageStream : System.Net.WebSockets.WebSocket * System.Net.WebSockets.WebSocketMessageType -> System.Net.WebSockets.WebSocketStream
Public Shared Function CreateWritableMessageStream (webSocket As WebSocket, writeMessageType As WebSocketMessageType) As WebSocketStream
Parameters
- writeMessageType
- WebSocketMessageType
The type of messages that should be written as part of WriteAsync calls.
Each write on the Stream results in writing a partial message to the underlying WebSocket.
When the Stream is disposed, it will write an empty message to the underlying WebSocket to signal the end of the message.
Returns
A new instance of WebSocketStream that forwards writes on the Stream to the underlying WebSocket.