mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-19 09:25:28 +00:00
68e67c881b
- RemoteRC supplants most of the functionality throughout the code of RouterContact - Next step will be to sort out CI issues, then see if we can get rid of either LocalRC (and therefore RouterContact entirely)
33 lines
553 B
C++
33 lines
553 B
C++
#pragma once
|
|
|
|
#include <llarp/router_contact.hpp>
|
|
|
|
namespace llarp::service
|
|
{
|
|
struct Endpoint;
|
|
|
|
struct RouterLookupJob
|
|
{
|
|
RouterLookupJob(Endpoint* p, RouterLookupHandler h);
|
|
|
|
RouterLookupHandler handler;
|
|
uint64_t txid;
|
|
llarp_time_t started;
|
|
|
|
bool
|
|
IsExpired(llarp_time_t now) const
|
|
{
|
|
if (now < started)
|
|
return false;
|
|
return now - started > 30s;
|
|
}
|
|
|
|
void
|
|
InformResult(std::vector<RemoteRC> result)
|
|
{
|
|
if (handler)
|
|
handler(result);
|
|
}
|
|
};
|
|
} // namespace llarp::service
|