Class TcpDaemon
Defined in File TcpDaemon.h
Class Documentation
-
class TcpDaemon
Public Functions
-
TcpDaemon()
-
bool init(int port)
Initialize the socket communication.
This function allows the middleware to estabilish a connection to the DESERT stack through a TCP socket.
- Parameters:
port – The TCP port of the DESERT application layer
Public Static Functions
-
static std::vector<uint8_t> read_packet()
Read a packet from the _rx_packets member as vector of bytes.
This function is used by the various RxStream instances contained in subscribers, clients and services.
- Returns:
The packet that was read from the DESERT stack
-
static void enqueue_packet(std::vector<uint8_t> packet)
Enqueue a packet in the _tx_packets member as vector of bytes.
This function is used by the various TxStream instances contained in publishers, clients and services.
- Parameters:
packet – The packet that has to be sent through the DESERT stack
-
TcpDaemon()