2021-03-09 22:24:35 +00:00
|
|
|
#pragma once
|
2019-04-19 16:02:32 +00:00
|
|
|
|
2021-03-09 22:24:35 +00:00
|
|
|
#include "protocol.hpp"
|
2023-10-24 13:18:03 +00:00
|
|
|
|
2021-03-09 22:24:35 +00:00
|
|
|
#include <llarp/util/buffer.hpp>
|
2023-10-24 13:18:03 +00:00
|
|
|
|
2019-04-19 16:02:32 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2022-07-28 16:07:38 +00:00
|
|
|
namespace llarp::service
|
2019-04-19 16:02:32 +00:00
|
|
|
{
|
2022-07-28 16:07:38 +00:00
|
|
|
struct PendingBuffer
|
2019-04-19 16:02:32 +00:00
|
|
|
{
|
2022-07-28 16:07:38 +00:00
|
|
|
std::vector<byte_t> payload;
|
|
|
|
ProtocolType protocol;
|
2019-04-19 16:02:32 +00:00
|
|
|
|
2022-07-28 16:07:38 +00:00
|
|
|
inline llarp_buffer_t
|
|
|
|
Buffer()
|
|
|
|
{
|
|
|
|
return llarp_buffer_t{payload};
|
|
|
|
}
|
2019-04-19 16:02:32 +00:00
|
|
|
|
2022-07-28 16:07:38 +00:00
|
|
|
PendingBuffer(const llarp_buffer_t& buf, ProtocolType t) : payload{buf.copy()}, protocol{t}
|
|
|
|
{}
|
|
|
|
};
|
2019-04-19 16:02:32 +00:00
|
|
|
|
2022-07-28 16:07:38 +00:00
|
|
|
} // namespace llarp::service
|