Class jac::InputPacketCommunicator
ClassList > jac > InputPacketCommunicator
Communicator interface that can be used to receive packets.
#include <communicator.h>
Inherited by the following classes: jac::RouterInputPacketCommunicator
Public Functions
Type | Name |
---|---|
InputPacketCommunicator () = default |
|
InputPacketCommunicator (const InputPacketCommunicator &) = delete |
|
virtual size_t | available () = 0 Get the number of packets available to read. |
virtual void | cancelRead () = 0 Cancel any blocking read. |
virtual void | clear () = 0 Clear the buffer. |
virtual std::optional< std::pair< int, std::vector< uint8_t > > > | get () = 0 Get the next packet. |
InputPacketCommunicator & | operator= (const InputPacketCommunicator &) = delete |
virtual | ~InputPacketCommunicator () = default |
Public Functions Documentation
function InputPacketCommunicator [1/2]
function InputPacketCommunicator [2/2]
function available
Get the number of packets available to read.
Returns:
The number
function cancelRead
function clear
function get
Get the next packet.
virtual std::optional< std::pair< int, std::vector< uint8_t > > > jac::InputPacketCommunicator::get () = 0
Note:
This method blocks until a packet is available.
Returns:
The packet
function operator=
InputPacketCommunicator & jac::InputPacketCommunicator::operator= (
const InputPacketCommunicator &
) = delete
function ~InputPacketCommunicator
The documentation for this class was generated from the following file src/jac/link/communicator.h