1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00
lokinet/llarp/service/hidden_service_address_lookup.hpp

42 lines
1 KiB
C++
Raw Normal View History

#ifndef LLARP_SERVICE_HIDDEN_SERVICE_ADDRESS_LOOKUP_HPP
#define LLARP_SERVICE_HIDDEN_SERVICE_ADDRESS_LOOKUP_HPP
#include <routing/dht_message.hpp>
#include <service/intro_set.hpp>
#include <service/lookup.hpp>
namespace llarp
{
namespace service
{
struct Endpoint;
struct HiddenServiceAddressLookup : public IServiceLookup
{
2020-01-27 22:30:41 +01:00
const PubKey rootkey;
uint64_t relayOrder;
2020-01-27 22:30:41 +01:00
const dht::Key_t location;
using HandlerFunc =
std::function<bool(const Address&, std::optional<IntroSet>, const RouterID&)>;
HandlerFunc handle;
HiddenServiceAddressLookup(
Endpoint* p,
HandlerFunc h,
const dht::Key_t& location,
const PubKey& rootkey,
uint64_t relayOrder,
uint64_t tx);
2019-07-31 01:42:13 +02:00
~HiddenServiceAddressLookup() override = default;
bool
HandleResponse(const std::set<EncryptedIntroSet>& results) override;
std::shared_ptr<routing::IMessage>
2019-07-31 01:42:13 +02:00
BuildRequestMessage() override;
};
} // namespace service
} // namespace llarp
#endif