|
|
void | setEventLoop (AsyncEventLoop &loop) |
| |
|
void | afterProcess (Span< const char > inputAfter, Span< char > outputAfter) |
| |
|
void | afterFinalize (Span< char > outputAfter, bool streamEnded) |
| |
|
Result | init (AsyncBuffersPool &buffersPool, Span< AsyncReadableStream::Request > readableRequests, Span< AsyncWritableStream::Request > writableRequests) |
| |
| Result | init (AsyncBuffersPool &buffersPool, Span< Request > requests) |
| | Emitted when the underlying resource has been closed.
|
| |
| Result | start () |
| | Starts the readable stream, that will emit eventData.
|
| |
| void | pause () |
| | Pauses the readable stream (that can be later resumed)
|
| |
| void | resumeReading () |
| | Resumes the readable stream paused by AsyncReadableStream::pause.
|
| |
| void | destroy () |
| | Forcefully destroys the readable stream before it's end event releasing all resources.
|
| |
| bool | isEnded () const |
| | Returns true if the stream is ended (AsyncReadableStream::end has been called)
|
| |
| AsyncBuffersPool & | getBuffersPool () |
| | Obtains the AsyncBuffersPool to request more buffers.
|
| |
| void | push (AsyncBufferView::ID bufferID, size_t newSize) |
| | Use push from inside AsyncReadableStream::asyncRead function to queue received data.
|
| |
| void | pushEnd () |
| | Use pushEnd from inside AsyncReadableStream::asyncRead to signal production end.
|
| |
| void | reactivate (bool doReactivate) |
| | Use reactivate(true) from inside AsyncReadableStream::asyncRead function to ask the state machine to invoke asyncRead again.
|
| |
| void | emitError (Result error) |
| | Signals an async error received.
|
| |
| bool | getBufferOrPause (size_t minumumSizeInBytes, AsyncBufferView::ID &bufferID, Span< char > &data) |
| | Returns an unused buffer from pool or pauses the stream if none is available.
|
| |
| Result | init (AsyncBuffersPool &buffersPool, Span< Request > requests) |
| | Emitted when no more data can be written.
|
| |
| 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.
|
| |
| Result | write (Span< const char > data, Function< void(AsyncBufferView::ID)> cb={}) |
| | Try requesting a buffer big enough and copy data into it.
|
| |
| template<size_t N> |
| Result | write (const char(&str)[N]) |
| | Write a C-string literal in the stream.
|
| |
| void | end () |
| | Ends the writable stream, waiting for all in-flight and queued writes to finish.
|
| |
| AsyncBuffersPool & | getBuffersPool () |
| | Obtains the buffers pool to access its data.
|
| |
| 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.
|
| |
| void | resumeWriting () |
| | Resumes writing queued requests for this stream.
|
| |
| Result | unshift (AsyncBufferView::ID bufferID, Function< void(AsyncBufferView::ID)> &&cb) |
| | Puts back a buffer at the top of the write queue.
|
| |
| void | emitError (Result error) |
| | Signals an async error received.
|
| |
| void | tryAsync (Result potentialError) |
| | Will emit error if the passed in Result is false.
|
| |
|
void | stop () |
| |