lokinet/llarp/service/hidden_service_address_lookup.hpp

35 lines
948 B
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
{
Address remote;
using HandlerFunc = std::function< bool(const Address&, const IntroSet*,
const RouterID&) >;
HandlerFunc handle;
HiddenServiceAddressLookup(Endpoint* p, HandlerFunc h,
const Address& addr, uint64_t tx);
2019-07-30 23:42:13 +00:00
~HiddenServiceAddressLookup() override = default;
bool
2019-07-30 23:42:13 +00:00
HandleResponse(const std::set< IntroSet >& results) override;
std::shared_ptr< routing::IMessage >
2019-07-30 23:42:13 +00:00
BuildRequestMessage() override;
};
} // namespace service
} // namespace llarp
#endif