Channel is implemented with a pair of anonymous sockets.
More...
#include <channel.hpp>
Channel is implemented with a pair of anonymous sockets.
utils::Channel::Channel |
( |
const bool |
closeOnExec = true | ) |
|
|
explicit |
utils::Channel::Channel |
( |
const int |
fd | ) |
|
|
explicit |
utils::Channel::~Channel |
( |
| ) |
|
utils::Channel::Channel |
( |
const Channel & |
| ) |
|
|
delete |
void utils::Channel::closeSocket |
( |
int |
socketIndex | ) |
|
|
private |
int utils::Channel::getFD |
( |
| ) |
|
Get an active file descriptor.
int utils::Channel::getLeftFD |
( |
| ) |
|
Gen the left file descriptor.
int utils::Channel::getRightFD |
( |
| ) |
|
Gen the right file descriptor.
template<typename Data >
Data utils::Channel::read |
( |
| ) |
|
Receive data of a given type (size)
void utils::Channel::setCloseOnExec |
( |
const bool |
closeOnExec | ) |
|
Sets close on exec on an active fd to either true or false.
void utils::Channel::setLeft |
( |
| ) |
|
Use the "left" end of the channel Closes the "right" end.
void utils::Channel::setRight |
( |
| ) |
|
Use the "right" end of the channel Closes the "left" end.
void utils::Channel::shutdown |
( |
| ) |
|
Gracefully shutdown the used end of the channel.
template<typename Data >
void utils::Channel::write |
( |
const Data & |
data | ) |
|
Send the data to the other end of the channel.
- Parameters
-
int utils::Channel::mSocketIndex |
|
private |
std::array<int, 2> utils::Channel::mSockets |
|
private |
The documentation for this class was generated from the following files: