Creates a pipe, used for inter-process communication. Currently used just in Tests.
More...
#include <pipe_communication.h>
Creates a pipe, used for inter-process communication. Currently used just in Tests.
◆ PipeCommunication()
PipeCommunication::PipeCommunication |
( |
| ) |
|
◆ ~PipeCommunication()
PipeCommunication::~PipeCommunication |
( |
| ) |
|
◆ closeRead()
void PipeCommunication::closeRead |
( |
| ) |
|
◆ closeWrite()
void PipeCommunication::closeWrite |
( |
| ) |
|
◆ readFd()
int PipeCommunication::readFd |
( |
| ) |
const |
Get Read File Descriptor.
◆ readP()
ssize_t PipeCommunication::readP |
( |
void * |
buf, |
|
|
size_t |
count, |
|
|
u_int16_t |
tries = 1 , |
|
|
u_int16_t |
sleepSecs = 0 |
|
) |
| |
Read from pipe.
- Parameters
-
buf | buffer to read to |
count | Number of bytes to read |
tries | How often to try to read from buffer |
sleepSecs | How long to wait between retries |
- Returns
- -1 on error, else number of read bytes
◆ writeFd()
int PipeCommunication::writeFd |
( |
| ) |
const |
Get Write File Descriptor.
◆ writeP()
ssize_t PipeCommunication::writeP |
( |
const void * |
buf, |
|
|
size_t |
count, |
|
|
u_int16_t |
tries = 1 , |
|
|
u_int16_t |
sleepSecs = 0 |
|
) |
| |
Write to pipe.
- Parameters
-
buf | buffer to write from |
count | Number of bytes to write |
tries | How often to try to write from buffer |
sleepSecs | How long to wait between retries |
- Returns
- -1 on error, else number of written bytes
The documentation for this class was generated from the following files: