---
title: llarp/service/router_lookup_job.hpp

---

# llarp/service/router_lookup_job.hpp



## Namespaces

| Name           |
| -------------- |
| **[llarp](Namespaces/namespacellarp.md)** <br>[crypto.hpp] |
| **[llarp::service](Namespaces/namespacellarp_1_1service.md)**  |

## Classes

|                | Name           |
| -------------- | -------------- |
| struct | **[llarp::service::RouterLookupJob](Classes/structllarp_1_1service_1_1RouterLookupJob.md)**  |




## Source code

```cpp
#pragma once

#include <llarp/router_contact.hpp>

namespace llarp
{
  namespace 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<RouterContact> result)
      {
        if (handler)
          handler(result);
      }
    };
  }  // namespace service
}  // namespace llarp
```


-------------------------------

Updated on 2022-11-17 at 22:27:42 +0000
