StreamWebSocket.OutputStream StreamWebSocket.OutputStream StreamWebSocket.OutputStream StreamWebSocket.OutputStream StreamWebSocket.OutputStream Property

Definition

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

public : IOutputStream OutputStream { get; }
IOutputStream OutputStream();
public IOutputStream OutputStream { get; }
Public ReadOnly Property OutputStream As IOutputStream
var iOutputStream = streamWebSocket.outputStream;

Property Value

A sequential stream of bytes to be written to the remote destination.

Remarks

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

The following specific errors can occur when you call IOutputStream.FlushAsync on the OutputStream of a StreamWebSocket 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.

See also