---
title: llarp/layers/platform/name_resolver.hpp

---

# llarp/layers/platform/name_resolver.hpp



## Namespaces

| Name           |
| -------------- |
| **[llarp](Namespaces/namespacellarp.md)** <br>[crypto.hpp] |
| **[llarp::layers](Namespaces/namespacellarp_1_1layers.md)**  |
| **[llarp::layers::platform](Namespaces/namespacellarp_1_1layers_1_1platform.md)**  |

## Classes

|                | Name           |
| -------------- | -------------- |
| class | **[llarp::layers::platform::NameResolver](Classes/classllarp_1_1layers_1_1platform_1_1NameResolver.md)**  |




## Source code

```cpp
#pragma once

#include <llarp/layers/flow/flow_layer.hpp>

#include "platform_addr.hpp"
#include "name_cache.hpp"

#include <chrono>
#include <functional>
#include <memory>
#include <optional>

#include <oxenc/variant.h>

#include <llarp/util/types.hpp>
#include <llarp/dns/question.hpp>
#include <variant>
#include <vector>

namespace llarp::layers::platform
{
  class PlatformLayer;
  class NameCache;

  class NameResolver
  {
    NameCache& _name_cache;
    flow::FlowLayer& _flow_layer;

   public:
    NameResolver(NameCache& name_cache, flow::FlowLayer& flow_layer);

    void
    resolve_flow_addr_async(
        std::string name, std::function<void(std::optional<flow::FlowAddr>)> handler);
  };

}  // namespace llarp::layers::platform
```


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

Updated on 2023-03-06 at 20:36:34 +0000
