#include <Pipe.h>
Inherits noncopyable.
|
| Pipe (bool nonBlockingRead, bool nonBlockingWrite, bool closeOnExec) |
|
std::size_t | read (void *buf, std::size_t count) |
|
std::size_t | write (const void *buf, std::size_t count) |
|
Simple wrapper around pipes.
fesa::Pipe::Pipe |
( |
bool |
nonBlockingRead, |
|
|
bool |
nonBlockingWrite, |
|
|
bool |
closeOnExec |
|
) |
| |
Constructor.
- Parameters
-
nonBlockingRead | if true, reads on this pipe will be non-blocking |
nonBlockingWrite | if true, writes on this pipe will be non-blocking |
closeOnExec | if true, the close on exec flag is set on pipes file descriptors |
std::size_t fesa::Pipe::read |
( |
void * |
buf, |
|
|
std::size_t |
count |
|
) |
| |
Reads from the pipe up to count bytes. Result is written to buf. If the pipe is non-blocking and the read operation would block, then this immediately returns 0.
- Returns
- the number of bytes actually read
- Exceptions
-
std::size_t fesa::Pipe::write |
( |
const void * |
buf, |
|
|
std::size_t |
count |
|
) |
| |
Writes to the pipe up to count bytes from buf. If the pipe is non-blocking and the write operation would block, then this immediately returns 0.
- Returns
- the number of bytes actually read
- Exceptions
-
The documentation for this class was generated from the following files: