73 [[nodiscard]]
auto data() const -> std::span<const uint8_t>;
79 [[nodiscard]] auto
length() const noexcept ->
size_t;
85 [[nodiscard]] auto
empty() const noexcept ->
bool;
92 [[nodiscard]] auto operator==(const
connection_id& other) const noexcept ->
bool;
99 [[nodiscard]] auto operator!=(const
connection_id& other) const noexcept ->
bool;
106 [[nodiscard]] auto operator<(const
connection_id& other) const noexcept ->
bool;
112 [[nodiscard]] auto
to_string() const -> std::
string;
QUIC Connection ID (RFC 9000 Section 5.1)
std::array< uint8_t, max_length > data_
auto length() const noexcept -> size_t
Get the length of the connection ID.
auto to_string() const -> std::string
Convert to hexadecimal string for debugging.
auto empty() const noexcept -> bool
Check if the connection ID is empty.
connection_id()=default
Default constructor creates an empty connection ID.
static auto generate(size_t length=8) -> connection_id
Generate a random connection ID.
static constexpr size_t max_length
Maximum length of a connection ID (RFC 9000)
auto data() const -> std::span< const uint8_t >
Get the raw bytes of the connection ID.