Objects of this class represent a stream that can be used to send data to a peer. Use the openStream function to create these objects.
Closes the stream.
Attempts to write the contents of the provided data buffer to the stream.
The streamWriteCompleted event is fired when the operation is completed.
The data to be written.
Returns whether the stream can be written to.