#include <userver/engine/io/common.hpp>
Interface for readable and writable streams
Definition at line 142 of file common.hpp.
Public Member Functions | |
| ReadableBase & | GetReadableBase () |
| WritableBase & | GetWritableBase () |
| virtual bool | IsValid () const =0 |
| Whether the stream is valid. | |
| 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 |
| virtual bool | WaitReadable (Deadline)=0 |
| Suspends current task until the stream has data available. | |
| AwaitableToken | GetAwaitableToken () |
| Satisfies engine::Awaitable, for use with engine::WaitAnyContext and friends. | |
| virtual size_t | WriteAll (const void *buf, size_t len, Deadline deadline)=0 |
| Sends exactly len bytes of buf. | |
| virtual size_t | WriteAll (std::span< const IoData > list, Deadline deadline) |
| Sends IoData array using vector I/O (e.g. writev). | |
| virtual size_t | WriteAll (std::initializer_list< IoData > list, Deadline deadline) |
| Sends IoData initializer list using vector I/O (e.g. writev). | |
| virtual bool | WaitWriteable (Deadline deadline)=0 |
| Suspends current task until the data is available. | |
| AwaitableToken | GetAwaitableToken () |
| Satisfies engine::Awaitable, for use with engine::WaitAnyContext and friends. | |
Protected Member Functions | |
| void | SetReadableAwaitableToken (AwaitableToken token) |
| void | SetWritableAwaitableToken (AwaitableToken token) |
|
inlineinherited |
Satisfies engine::Awaitable, for use with engine::WaitAnyContext and friends.
Definition at line 39 of file common.hpp.
|
inlineinherited |
Satisfies engine::Awaitable, for use with engine::WaitAnyContext and friends.
Definition at line 91 of file common.hpp.
|
inline |
Definition at line 146 of file common.hpp.
|
inline |
Definition at line 148 of file common.hpp.
|
pure virtualinherited |
Whether the stream is valid.
Implemented in engine::io::PipeReader, engine::io::Socket, and engine::io::TlsWrapper.
|
nodiscardpure virtualinherited |
Receives exactly len bytes from the stream.
Implemented in engine::io::PipeReader, engine::io::Socket, and engine::io::TlsWrapper.
|
inlinenodiscardvirtualinherited |
Receives up to len (including zero) bytes from the stream.
Reimplemented in engine::io::Socket, and engine::io::TlsWrapper.
Definition at line 65 of file common.hpp.
|
nodiscardpure virtualinherited |
Receives at least one byte from the stream.
Implemented in engine::io::PipeReader, engine::io::Socket, and engine::io::TlsWrapper.
|
inlineprotectedinherited |
Definition at line 44 of file common.hpp.
|
inlineprotectedinherited |
Definition at line 96 of file common.hpp.
|
nodiscardpure virtualinherited |
Suspends current task until the stream has data available.
Implemented in engine::io::PipeReader, engine::io::Socket, and engine::io::TlsWrapper.
|
nodiscardpure virtualinherited |
Suspends current task until the data is available.
Implemented in engine::io::PipeWriter, engine::io::Socket, and engine::io::TlsWrapper.
|
nodiscardpure virtualinherited |
Sends exactly len bytes of buf.
Implemented in engine::io::PipeWriter, engine::io::Socket, and engine::io::TlsWrapper.
|
inlinenodiscardvirtualinherited |
Sends IoData initializer list using vector I/O (e.g. writev).
Reimplemented in engine::io::TlsWrapper.
Definition at line 133 of file common.hpp.
|
inlinenodiscardvirtualinherited |
Sends IoData array using vector I/O (e.g. writev).
Reimplemented in engine::io::Socket, and engine::io::TlsWrapper.
Definition at line 123 of file common.hpp.