You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#ifndef LLARP_DHT_MESSAGES_GOT_INTRO_HPP
|
|
|
|
#define LLARP_DHT_MESSAGES_GOT_INTRO_HPP
|
|
|
|
#include <llarp/dht/message.hpp>
|
|
|
|
#include <llarp/service/IntroSet.hpp>
|
|
|
|
|
|
|
|
namespace llarp
|
|
|
|
{
|
|
|
|
namespace dht
|
|
|
|
{
|
|
|
|
/// acknologement to PublishIntroMessage or reply to FinIntroMessage
|
|
|
|
struct GotIntroMessage : public IMessage
|
|
|
|
{
|
|
|
|
std::list< llarp::service::IntroSet > I;
|
|
|
|
uint64_t T = 0;
|
|
|
|
|
|
|
|
GotIntroMessage() : IMessage({})
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
GotIntroMessage(uint64_t tx, const llarp::service::IntroSet* i = nullptr);
|
|
|
|
|
|
|
|
~GotIntroMessage();
|
|
|
|
|
|
|
|
bool
|
|
|
|
BEncode(llarp_buffer_t* buf) const;
|
|
|
|
|
|
|
|
bool
|
|
|
|
DecodeKey(llarp_buffer_t key, llarp_buffer_t* val);
|
|
|
|
|
|
|
|
bool
|
|
|
|
HandleMessage(llarp_dht_context* ctx,
|
|
|
|
std::vector< IMessage* >& replies) const;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|