WebSocketStream.CreateReadableMessageStream(WebSocket) 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 reads a single message from the underlying WebSocket.
public:
static System::Net::WebSockets::WebSocketStream ^ CreateReadableMessageStream(System::Net::WebSockets::WebSocket ^ webSocket);
public static System.Net.WebSockets.WebSocketStream CreateReadableMessageStream(System.Net.WebSockets.WebSocket webSocket);
static member CreateReadableMessageStream : System.Net.WebSockets.WebSocket -> System.Net.WebSockets.WebSocketStream
Public Shared Function CreateReadableMessageStream (webSocket As WebSocket) As WebSocketStream
Parameters
Returns
A new instance of WebSocketStream that forwards reads on the Stream to the underlying WebSocket.
Remarks
Reads on the Stream will read a single message from the underlying WebSocket. This means that reads will start returning 0 bytes read once all data has been consumed from the next message received in the WebSocket.