2021-03-09 22:24:35 +00:00
|
|
|
#pragma once
|
2018-06-22 00:25:30 +00:00
|
|
|
|
2021-03-09 22:24:35 +00:00
|
|
|
#include "message.hpp"
|
2018-06-22 00:25:30 +00:00
|
|
|
|
2023-08-29 14:26:59 +00:00
|
|
|
namespace llarp::routing
|
2018-06-22 00:25:30 +00:00
|
|
|
{
|
2023-08-29 14:26:59 +00:00
|
|
|
struct PathConfirmMessage final : public AbstractRoutingMessage
|
2018-06-22 00:25:30 +00:00
|
|
|
{
|
2023-08-29 14:26:59 +00:00
|
|
|
llarp_time_t pathLifetime = 0s;
|
|
|
|
llarp_time_t pathCreated = 0s;
|
2019-06-15 14:55:13 +00:00
|
|
|
|
2023-08-29 14:26:59 +00:00
|
|
|
PathConfirmMessage() = default;
|
|
|
|
PathConfirmMessage(llarp_time_t lifetime);
|
|
|
|
~PathConfirmMessage() override = default;
|
2018-06-22 00:25:30 +00:00
|
|
|
|
2023-08-29 14:26:59 +00:00
|
|
|
bool
|
|
|
|
BEncode(llarp_buffer_t* buf) const override;
|
2018-06-22 00:25:30 +00:00
|
|
|
|
2023-08-29 14:26:59 +00:00
|
|
|
bool
|
|
|
|
DecodeKey(const llarp_buffer_t& key, llarp_buffer_t* val) override;
|
2018-06-22 13:59:28 +00:00
|
|
|
|
2023-08-29 14:26:59 +00:00
|
|
|
bool
|
|
|
|
HandleMessage(AbstractRoutingMessageHandler* h, AbstractRouter* r) const override;
|
2018-12-27 14:32:37 +00:00
|
|
|
|
2023-08-29 14:26:59 +00:00
|
|
|
void
|
|
|
|
Clear() override
|
|
|
|
{
|
|
|
|
pathLifetime = 0s;
|
|
|
|
pathCreated = 0s;
|
|
|
|
version = 0;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
} // namespace llarp::routing
|