mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-09 13:10:25 +00:00
fe01c38d8e
* start on dht lookups for hidden services * make debug logging confurable on runtime with env var LLARP_DEBUG=1 * make eventloop tick only when we get traffic * make testnet parameters configurable on runtime
47 lines
1.1 KiB
C++
47 lines
1.1 KiB
C++
#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(const Key_t& from) : IMessage(from)
|
|
{
|
|
}
|
|
|
|
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);
|
|
|
|
virtual bool
|
|
HandleMessage(llarp_dht_context* ctx,
|
|
std::vector< IMessage* >& replies) const;
|
|
};
|
|
|
|
struct RelayedGotIntroMessage : public GotIntroMessage
|
|
{
|
|
RelayedGotIntroMessage() : GotIntroMessage({})
|
|
{
|
|
}
|
|
|
|
bool
|
|
HandleMessage(llarp_dht_context* ctx,
|
|
std::vector< IMessage* >& replies) const;
|
|
};
|
|
} // namespace dht
|
|
} // namespace llarp
|
|
#endif |