Class StreamWriter

Wraps a Transport.

This exposes write(), writeEof(), canWriteEof(), getExtraInfo() and close(). It adds drain() coroutine for waiting for flow control. It also adds a transport property which references the Transport directly.

This class is not thread safe.

Inherits from

  • Object (base class)

Properties

Name Type Description
transport [get] WriteTransport Transport.

Methods

Name Description
canWriteEof Return true if the transport supports writeEof(), false if not. See WriteTransport.canWriteEof().
close Close the transport: see BaseTransport.close().
drain Give the write buffer of the underlying transport a chance to be flushed.
getExtraInfo Return optional transport information: see BaseTransport.getExtraInfo().
write Write some data bytes to the transport: see WriteTransport.write().
writeEof Close the write end of the transport after flushing buffered data: see WriteTransport.write_eof().

Authors

Dragos Carp

Copyright

© 2015-2016 Dragos Carp

License

Boost Software License - Version 1.0