mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-03 23:15:52 +00:00
273270916e
This commit reflects changes to clang-format rules. Unfortunately, these rule changes create a massive change to the codebase, which causes an apparent rewrite of git history. Git blame's --ignore-rev flag can be used to ignore this commit when attempting to `git blame` some code.
34 lines
803 B
C++
34 lines
803 B
C++
#include <service/lookup.hpp>
|
|
|
|
#include <path/path.hpp>
|
|
#include <util/time.hpp>
|
|
#include <router/abstractrouter.hpp>
|
|
#include <util/thread/logic.hpp>
|
|
#include <utility>
|
|
|
|
namespace llarp
|
|
{
|
|
struct AbstractRouter;
|
|
|
|
namespace service
|
|
{
|
|
IServiceLookup::IServiceLookup(ILookupHolder* p, uint64_t tx, std::string n)
|
|
: m_parent(p), txid(tx), name(std::move(n))
|
|
{
|
|
m_created = time_now_ms();
|
|
p->PutLookup(this, tx);
|
|
}
|
|
|
|
bool
|
|
IServiceLookup::SendRequestViaPath(path::Path_ptr path, AbstractRouter* r)
|
|
{
|
|
auto msg = BuildRequestMessage();
|
|
if (!msg)
|
|
return false;
|
|
endpoint = path->Endpoint();
|
|
LogicCall(r->logic(), [=]() { path->SendRoutingMessage(*msg, r); });
|
|
return true;
|
|
}
|
|
} // namespace service
|
|
} // namespace llarp
|