|
template<typename DescriptorType > |
Result | init (AsyncBuffersPool &buffersPool, Span< Request > requests, AsyncEventLoop &loop, const DescriptorType &descriptor) |
|
Result | registerAutoCloseDescriptor (bool value) |
| Registers or unregisters a listener to AsyncWritableStream::eventFinish to close descriptor. More...
|
|
Result | init (AsyncBuffersPool &buffersPool, Span< Request > requests) |
| Emitted when no more data can be written. More...
|
|
Result | write (AsyncBufferView::ID bufferID, Function< void(AsyncBufferView::ID)> cb={}) |
| Writes a buffer (that must be allocated by the AsyncBuffersPool passed in AsyncWritableStream) When the buffer it will be actually written, AsyncWritableStream::eventWritten will be raised and its reference count will be decreased. More...
|
|
Result | write (Span< const char > data, Function< void(AsyncBufferView::ID)> cb={}) |
| Try requesting a buffer big enough and copy data into it. More...
|
|
template<size_t N> |
Result | write (const char(&str)[N]) |
| Write a C-string literal in the stream. More...
|
|
void | end () |
| Ends the writable stream, waiting for all in-flight and queued writes to finish. More...
|
|
AsyncBuffersPool & | getBuffersPool () |
| Obtains the buffers pool to access its data. More...
|
|
void | finishedWriting (AsyncBufferView::ID bufferID, Function< void(AsyncBufferView::ID)> &&cb, Result res) |
| Signals that the given buffer (previously queued by write) has been fully written. More...
|
|
void | resumeWriting () |
| Resumes writing queued requests for this stream. More...
|
|
Result | unshift (AsyncBufferView::ID bufferID, Function< void(AsyncBufferView::ID)> &&cb) |
| Puts back a buffer at the top of the write queue. More...
|
|
void | emitError (Result error) |
| Signals an async error received. More...
|
|
void | tryAsync (Result potentialError) |
| Will emit error if the passed in Result is false. More...
|
|
void | stop () |
|