Why: Communication#

class Pipe#

A pipe is used to communicate unstructured data (without fixed message boundaries).

Public Functions

inline std::expected<std::size_t, Why::OSError> read(uint8_t *buffer, size_t len)#
inline std::expected<std::size_t, Why::OSError> read_noblock(uint8_t *buffer, size_t len)#
inline std::expected<std::size_t, Why::OSError> write(const uint8_t *buffer, size_t len)#
inline std::expected<std::size_t, Why::OSError> write_noblock(const uint8_t *buffer, size_t len)#
inline bool ok() const#
inline int _pollfd() const#

Public Static Functions

static std::expected<Pipe, OSError> create()#

Create a pipe

template<typename T>
class MessageQueue#

A message queue is used to communicate structured data, and has fixed message boundaries

Public Functions

inline std::expected<T, OSError> get()#
inline std::expected<T, OSError> get_noblock()#
inline std::expected<void, OSError> put(const T &elem)#
inline std::expected<void, OSError> put_noblock(const T &elem)#
inline int _pollfd() const#

Public Static Functions

static inline std::expected<MessageQueue<T>, OSError> create()#

Create a message queue