Reading end of an unidirectional pipe.
More...
#include <userver/engine/io/pipe.hpp>
|
bool | IsValid () const override |
| Whether the reading end of the pipe is valid.
|
|
bool | WaitReadable (Deadline) override |
| Suspends current task until the pipe has data available.
|
|
size_t | ReadSome (void *buf, size_t len, Deadline deadline) override |
| Receives at least one bytes from the pipe.
|
|
size_t | ReadAll (void *buf, size_t len, Deadline deadline) override |
|
int | Fd () const |
| File descriptor corresponding to the read end of the pipe.
|
|
int | Release () noexcept |
| Releases reading end file descriptor and invalidates it.
|
|
void | Close () |
|
Reading end of an unidirectional pipe.
Definition at line 20 of file pipe.hpp.
◆ Close()
void engine::io::PipeReader::Close |
( |
| ) |
|
Closes and invalidates the reading end of the pipe.
- Warning
- You should not call Close with pending I/O. This may work okay sometimes but it's loosely predictable.
◆ IsValid()
bool engine::io::PipeReader::IsValid |
( |
| ) |
const |
|
overridevirtual |
◆ ReadAll()
size_t engine::io::PipeReader::ReadAll |
( |
void * |
buf, |
|
|
size_t |
len, |
|
|
Deadline |
deadline |
|
) |
| |
|
overridevirtual |
Receives exactly len bytes from the pipe.
- Note
- Can return less than len if pipe is closed by peer.
Implements engine::io::ReadableBase.
◆ ReadSome()
size_t engine::io::PipeReader::ReadSome |
( |
void * |
buf, |
|
|
size_t |
len, |
|
|
Deadline |
deadline |
|
) |
| |
|
overridevirtual |
◆ WaitReadable()
bool engine::io::PipeReader::WaitReadable |
( |
Deadline |
| ) |
|
|
overridevirtual |
◆ Pipe
The documentation for this class was generated from the following file: