#include <userver/engine/io/common.hpp>
Interface for readable streams
Definition at line 26 of file common.hpp.
Public Member Functions | |
virtual bool | IsValid () const =0 |
Whether the stream is valid. | |
virtual bool | WaitReadable (Deadline)=0 |
Suspends current task until the stream has data available. | |
virtual std::optional< size_t > | ReadNoblock (void *buf, size_t len) |
virtual size_t | ReadSome (void *buf, size_t len, Deadline deadline)=0 |
Receives at least one byte from the stream. | |
virtual size_t | ReadAll (void *buf, size_t len, Deadline deadline)=0 |
impl::ContextAccessor * | TryGetContextAccessor () |
For internal use only. | |
Protected Member Functions | |
void | SetReadableContextAccessor (impl::ContextAccessor *ca) |
|
pure virtual |
Whether the stream is valid.
Implemented in engine::io::PipeReader, engine::io::Socket, and engine::io::TlsWrapper.
|
pure virtual |
Receives exactly len bytes from the stream.
Implemented in engine::io::PipeReader, engine::io::Socket, and engine::io::TlsWrapper.
|
inlinevirtual |
Receives up to len (including zero) bytes from the stream.
Reimplemented in engine::io::Socket.
Definition at line 39 of file common.hpp.
|
pure virtual |
Receives at least one byte from the stream.
Implemented in engine::io::PipeReader, engine::io::Socket, and engine::io::TlsWrapper.
|
inlineprotected |
Definition at line 57 of file common.hpp.
|
inline |
For internal use only.
Definition at line 54 of file common.hpp.
|
pure virtual |
Suspends current task until the stream has data available.
Implemented in engine::io::PipeReader, engine::io::Socket, and engine::io::TlsWrapper.