Set a drain handler on the stream. If the write queue is full, then the handler will be called when the write queue is ready to accept buffers again. See Pipe for an example of this being used.
The stream implementation defines when the drain handler, for example it could be when the queue size has been
reduced to maxSize / 2
.
Same as {@link WriteStream#end} but with an handler
called when the operation completes
Same as {@link WriteStream#end} but with an handler
called when the operation completes
Same as but with an handler
called when the operation completes
Same as but with an handler
called when the operation completes
Set an exception handler on the write stream.
Set the maximum size of the write queue to maxSize
. You will still be able to write to the stream even
if there is more than maxSize
items in the write queue. This is used as an indicator by classes such as
Pipe to provide flow control.
Same as but with an handler
called when the operation completes
Same as but with an handler
called when the operation completes
This will return true
if there are more bytes in the write queue than the value set using {@link WriteStream#setWriteQueueMaxSize}
Generated using TypeDoc
Represents a stream of data that can be written to.
Any class that implements this interface can be used by a Pipe to pipe data from a
ReadStream
to it.