Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 2.03 KB

messagewebsocket_outputstream.md

File metadata and controls

32 lines (21 loc) · 2.03 KB
-api-id -api-type
P:Windows.Networking.Sockets.MessageWebSocket.OutputStream
winrt property

Windows.Networking.Sockets.MessageWebSocket.OutputStream

-description

Gets the output stream to write to the remote network destination on a MessageWebSocket object.

-property-value

A sequential stream of bytes to be written to the remote destination as a single message.

-remarks

This property is used with the DataWriter object to write outgoing data to be sent to the remote network destination on a socket object.

The following specific errors can occur when you call IOutputStream.FlushAsync on the OutputStream of a MessageWebSocket if the websocket is in an invalid state at the time.

  • If the websocket instance has been explicitly closed (via delete, Dispose, or Close) or implicitly closed (fallen out of scope), FlushAsync throws an RO_E_CLOSED exception.
  • If the IOutputStream object associated with the websocket has been explicitly closed (via delete, Dispose, or Close) or implicitly closed (for example, by disposing of a DataWriter instance before calling DetachStream on it), FlushAsync throws an RO_E_CLOSED exception.
  • If the websocket is not connected yet (ConnectAsync has not been called), then FlushAsync throws an E_ILLEGAL_METHOD_CALL exception.

-examples

-see-also

DataWriter, IOutputStream