2018-06-29 14:25:09 +00:00
|
|
|
#ifndef LLARP_MESSAGES_DHT_HPP
|
|
|
|
#define LLARP_MESSAGES_DHT_HPP
|
|
|
|
#include <llarp/dht.hpp>
|
|
|
|
#include <llarp/routing/message.hpp>
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace llarp
|
|
|
|
{
|
|
|
|
namespace routing
|
|
|
|
{
|
|
|
|
struct DHTMessage : public IMessage
|
|
|
|
{
|
2018-09-02 18:25:42 +00:00
|
|
|
std::vector< std::unique_ptr< llarp::dht::IMessage > > M;
|
2018-06-29 14:25:09 +00:00
|
|
|
uint64_t V = 0;
|
|
|
|
|
|
|
|
~DHTMessage();
|
|
|
|
|
|
|
|
bool
|
|
|
|
DecodeKey(llarp_buffer_t key, llarp_buffer_t* val);
|
|
|
|
|
|
|
|
bool
|
|
|
|
BEncode(llarp_buffer_t* buf) const;
|
|
|
|
|
|
|
|
bool
|
|
|
|
HandleMessage(IMessageHandler* h, llarp_router* r) const;
|
|
|
|
};
|
|
|
|
} // namespace routing
|
|
|
|
} // namespace llarp
|
|
|
|
|
2018-09-02 18:25:42 +00:00
|
|
|
#endif
|