Represents messages received from an Aether process or a client. More...
#include <message.hh>
Public Member Functions | |
message (const capnp::word *buffer, const size_t length) | |
std::optional< container::span< const char > > | get_payload () const |
std::optional< uint64_t > | get_source_user_id () const |
std::optional< worker_id > | get_source_worker () const |
bool | is_source_global_state () const |
template<typename T > | |
bool | payload_as_pod (T &dest) const |
Used to conditionally unpack the binary message into the given struct type. More... | |
Represents messages received from an Aether process or a client.
aether::message::message::message | ( | const capnp::word * | buffer, |
const size_t | length | ||
) |
std::optional<container::span<const char> > aether::message::message::get_payload | ( | ) | const |
std::optional<uint64_t> aether::message::message::get_source_user_id | ( | ) | const |
std::nullopt
otherwise std::optional<worker_id> aether::message::message::get_source_worker | ( | ) | const |
std::nullopt
otherwise. bool aether::message::message::is_source_global_state | ( | ) | const |
|
inline |
Used to conditionally unpack the binary message into the given struct type.