Constructor
Calback to 'send' data onwards
Options
Returns true if close has been called.
Adds some queued data to send. Longer strings are automatically chunked up according to the buffer's settings.
Throws an error if close has been called.
Clear queued data.
Throws an error if close has been called.
Close writer (async)
Run in a continunously
loop to process queued data
False if queue is empty and loop should stop. True if it shoud continue.
Gets the buffer as a writable stream.
Do not close stream directly, use .close on this class instead.
Throws an error if .close() has been called.
Underlying stream
Buffers a queue of strings.
When text is queued via add, it is chopped up into chunks and sent in serial to the
dataHandler
function. Data is processed at a set rate, by default 10ms.It's also possible to get the buffer as a WritableStream:
Other functions: