20#ifndef ORES_COMMS_MESSAGING_HEARTBEAT_PROTOCOL_HPP
21#define ORES_COMMS_MESSAGING_HEARTBEAT_PROTOCOL_HPP
26#include "ores.comms/messaging/frame.hpp"
44 static std::expected<ping, error_code>
62 static std::expected<pong, error_code>
Contains messaging related infrastructure in the comms library.
Definition compression.hpp:29
frame create_ping_frame(std::uint32_t sequence, std::uint32_t correlation_id=0)
Create a ping frame.
Definition heartbeat.cpp:68
frame create_pong_frame(std::uint32_t sequence, std::uint32_t correlation_id=0)
Create a pong frame.
Definition heartbeat.cpp:73
Complete frame with header and payload.
Definition frame.hpp:77
Ping message sent by client to check connection liveness.
Definition heartbeat_protocol.hpp:35
static std::expected< ping, error_code > deserialize(std::span< const std::byte > data)
Deserialize from frame payload.
Definition heartbeat.cpp:37
static std::vector< std::byte > serialize(ping v)
Serialize to frame payload.
Definition heartbeat.cpp:28
Pong message sent by server in response to ping.
Definition heartbeat_protocol.hpp:53
static std::expected< pong, error_code > deserialize(std::span< const std::byte > data)
Deserialize from frame payload.
Definition heartbeat.cpp:57
static std::vector< std::byte > serialize(pong v)
Serialize to frame payload.
Definition heartbeat.cpp:48