Packet (C++-API)

This page describes the C++ implementation of Packets

struct a0::Packet : public a0::details::CppWrap<a0_packet_t>

Packet is immutable.

Public Functions

Packet()

Creates a new packet with no headers and an empty payload.

Packet(std::string payload)

Creates a new packet with no headers and the given payload.

Packet(string_view payload, tag_ref_t)

Packet(std::unordered_multimap<std::string, std::string> headers, std::string payload)

Creates a new packet with the given headers and the given payload.

Packet(std::unordered_multimap<std::string, std::string> headers, string_view payload, tag_ref_t)

string_view id() const

Packet unique identifier.

const std::unordered_multimap<std::string, std::string> &headers() const

Packet headers.

string_view payload() const

Packet payload.

Warning

doxygenstruct: Cannot find class “a0::PacketView” in doxygen xml output for project “AlephZero” from directory: ./doxygen_build/xml/