FIFO (named pipe) IPC receiver (reader)
More...
#include <fifo_receiver.h>
|
| | FifoReceiver (std::string pathname) |
| | Constructor.
|
| |
| int | Connection () const noexcept override |
| | Connection descriptor for sending and receiving.
|
| |
| bool | TrySetup () noexcept override |
| | Try to setup the communicator.
|
| |
| template<std::size_t N> |
| ssize_t | Receive (std::array< uint8_t, N > &buffer) const noexcept |
| | Receive a byte array from the FIFO pipe.
|
| |
| int | Descriptor () const noexcept |
| | File descriptor.
|
| |
| virtual bool | TryClose () noexcept |
| | Try to close the communicator.
|
| |
|
|
int | FileDescriptor |
| | File descriptor.
|
| |
FIFO (named pipe) IPC receiver (reader)
◆ FifoReceiver()
| AsyncBsdSocketLib::FifoReceiver::FifoReceiver |
( |
std::string | pathname | ) |
|
◆ Connection()
| int AsyncBsdSocketLib::FifoReceiver::Connection |
( |
| ) |
const |
|
overridevirtualnoexcept |
Connection descriptor for sending and receiving.
- Returns
- A non-negative value if there is a valid connection; otherwise -1
Implements AsyncBsdSocketLib::Communicator.
◆ Receive()
template<std::size_t N>
| ssize_t AsyncBsdSocketLib::FifoReceiver::Receive |
( |
std::array< uint8_t, N > & | buffer | ) |
const |
|
inlinenoexcept |
Receive a byte array from the FIFO pipe.
- Template Parameters
-
- Parameters
-
| buffer | Receive buffer byte array |
- Returns
- Size of received bytes (-1 in case of receiving failed)
- Warning
- Due to edge-triggered polling, starvation can occur
◆ TrySetup()
| bool AsyncBsdSocketLib::FifoReceiver::TrySetup |
( |
| ) |
|
|
overridevirtualnoexcept |