#include <userver/engine/io/pipe.hpp>
Writing end of an unidirectional pipe.
Definition at line 58 of file pipe.hpp.
|
bool | IsValid () const |
| Whether the writing end of the pipe is valid.
|
|
bool | WaitWriteable (Deadline) override |
| Suspends current task until the pipe can accept more data.
|
|
size_t | WriteAll (const void *buf, size_t len, Deadline deadline) override |
|
int | Fd () const |
| File descriptor corresponding to the write end of the pipe.
|
|
int | Release () noexcept |
| Releases writing end file descriptor and invalidates it.
|
|
void | Close () |
|
virtual size_t | WriteAll (std::initializer_list< IoData > list, Deadline deadline) |
|
impl::ContextAccessor * | TryGetContextAccessor () |
| For internal use only.
|
|
◆ Close()
void engine::io::PipeWriter::Close |
( |
| ) |
|
Closes and invalidates the writing end of the pipe.
- Warning
- You should not call Close with pending I/O. This may work okay sometimes but it's loosely predictable.
◆ SetWritableContextAccessor()
void engine::io::WritableBase::SetWritableContextAccessor |
( |
impl::ContextAccessor * | ca | ) |
|
|
inlineprotectedinherited |
◆ TryGetContextAccessor()
impl::ContextAccessor * engine::io::WritableBase::TryGetContextAccessor |
( |
| ) |
|
|
inlineinherited |
For internal use only.
Definition at line 97 of file common.hpp.
◆ WaitWriteable()
bool engine::io::PipeWriter::WaitWriteable |
( |
Deadline | | ) |
|
|
overridevirtual |
◆ WriteAll() [1/2]
size_t engine::io::PipeWriter::WriteAll |
( |
const void * | buf, |
|
|
size_t | len, |
|
|
Deadline | deadline ) |
|
overridevirtual |
Sends exactly len bytes to the pipe.
- Note
- Can return less than len if pipe is closed by peer.
Implements engine::io::WritableBase.
◆ WriteAll() [2/2]
virtual size_t engine::io::WritableBase::WriteAll |
( |
std::initializer_list< IoData > | list, |
|
|
Deadline | deadline ) |
|
inlinevirtualinherited |
◆ Pipe
The documentation for this class was generated from the following file: