---
title: llarp::layers::platform::NameResolverJob_Base
summary: a one shot job that will resolve a string to a resolved name which we can use to establish a flow to 

---

# llarp::layers::platform::NameResolverJob_Base



a one shot job that will resolve a string to a resolved name which we can use to establish a flow to 


`#include <name_resolver.hpp>`

## Public Functions

|                | Name           |
| -------------- | -------------- |
| template <typename resolution_t ,typename rep_t  =double\> <br>| **[NameResolverJob_Base](Classes/classllarp_1_1layers_1_1platform_1_1NameResolverJob__Base.md#function-nameresolverjob-base)**(std::string_view name_, std::chrono::duration< rep_t, resolution_t > timeout_) |
| virtual void | **[resolve_async](Classes/classllarp_1_1layers_1_1platform_1_1NameResolverJob__Base.md#function-resolve-async)**(std::function< void(std::optional< [ResolvedName](Classes/structllarp_1_1layers_1_1platform_1_1ResolvedName.md) >)> handler) |

## Protected Attributes

|                | Name           |
| -------------- | -------------- |
| const TimePoint_t | **[started_at](Classes/classllarp_1_1layers_1_1platform_1_1NameResolverJob__Base.md#variable-started-at)**  |
| const std::string | **[name](Classes/classllarp_1_1layers_1_1platform_1_1NameResolverJob__Base.md#variable-name)**  |
| const Duration_t | **[timeout](Classes/classllarp_1_1layers_1_1platform_1_1NameResolverJob__Base.md#variable-timeout)**  |

## Public Functions Documentation

### function NameResolverJob_Base

```cpp
template <typename resolution_t ,
typename rep_t  =double>
inline NameResolverJob_Base(
    std::string_view name_,
    std::chrono::duration< rep_t, resolution_t > timeout_
)
```


### function resolve_async

```cpp
virtual void resolve_async(
    std::function< void(std::optional< ResolvedName >)> handler
)
```


## Protected Attributes Documentation

### variable started_at

```cpp
const TimePoint_t started_at {TimePoint_t::clock::now()};
```


### variable name

```cpp
const std::string name;
```


### variable timeout

```cpp
const Duration_t timeout;
```


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

Updated on 2023-01-23 at 14:22:33 +0000