#include <userver/engine/io/pipe.hpp>
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.
◆ GetAwaitableToken()
◆ IsValid()
| bool engine::io::PipeReader::IsValid |
( |
| ) |
const |
|
overridevirtual |
◆ ReadAll()
| size_t engine::io::PipeReader::ReadAll |
( |
void * | buf, |
|
|
size_t | len, |
|
|
Deadline | deadline ) |
|
nodiscardoverridevirtual |
Receives exactly len bytes from the pipe.
- Note
- Can return less than len if pipe is closed by peer.
- Returns
- count of bytes read from the pipe
Implements engine::io::ReadableBase.
◆ ReadNoblock()
| virtual std::optional< size_t > engine::io::ReadableBase::ReadNoblock |
( |
void * | buf, |
|
|
size_t | len ) |
|
inlinenodiscardvirtualinherited |
◆ ReadSome()
| size_t engine::io::PipeReader::ReadSome |
( |
void * | buf, |
|
|
size_t | len, |
|
|
Deadline | deadline ) |
|
nodiscardoverridevirtual |
Receives at least one bytes from the pipe.
- Returns
- count of bytes read from the pipe
Implements engine::io::ReadableBase.
◆ SetReadableAwaitableToken()
| void engine::io::ReadAwaiter::SetReadableAwaitableToken |
( |
AwaitableToken | token | ) |
|
|
inlineprotectedinherited |
◆ WaitReadable()
| bool engine::io::PipeReader::WaitReadable |
( |
Deadline | | ) |
|
|
nodiscardoverridevirtual |
Suspends current task until the pipe has data available.
- Returns
- false on timeout or on task cancellations; true otherwise.
Implements engine::io::ReadAwaiter.
◆ Pipe
The documentation for this class was generated from the following file: