mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-02 03:40:12 +00:00
be234e4b6e
* snode to snode direct traffic * wire up dns on service node tun
32 lines
781 B
C++
32 lines
781 B
C++
#include <path.hpp>
|
|
#include <service/endpoint.hpp>
|
|
#include <service/lookup.hpp>
|
|
#include <time.hpp>
|
|
|
|
namespace llarp
|
|
{
|
|
namespace service
|
|
{
|
|
IServiceLookup::IServiceLookup(ILookupHolder *p, uint64_t tx,
|
|
const std::string &n)
|
|
: parent(p), txid(tx), name(n)
|
|
{
|
|
m_created = time_now_ms();
|
|
p->PutLookup(this, tx);
|
|
}
|
|
|
|
bool
|
|
IServiceLookup::SendRequestViaPath(llarp::path::Path *path,
|
|
llarp::Router *r)
|
|
{
|
|
auto msg = BuildRequestMessage();
|
|
if(!msg)
|
|
return false;
|
|
auto result = path->SendRoutingMessage(msg, r);
|
|
endpoint = path->Endpoint();
|
|
delete msg;
|
|
return result;
|
|
}
|
|
} // namespace service
|
|
} // namespace llarp
|