rippled
Loading...
Searching...
No Matches
Resolver.h
1#pragma once
2
3#include <xrpl/beast/net/IPEndpoint.h>
4
5#include <functional>
6#include <vector>
7
8namespace xrpl {
9
11{
12public:
14
15 virtual ~Resolver() = 0;
16
18 virtual void
20
22 virtual void
23 stop() = 0;
24
26 virtual void
27 start() = 0;
28
34 template <class Handler>
35 void
36 resolve(std::vector<std::string> const& names, Handler handler)
37 {
38 resolve(names, HandlerType(handler));
39 }
40
41 virtual void
42 resolve(std::vector<std::string> const& names, HandlerType const& handler) = 0;
44};
45
46} // namespace xrpl
virtual void stop_async()=0
Issue an asynchronous stop request.
virtual ~Resolver()=0
virtual void start()=0
Issue a synchronous start request.
std::function< void(std::string, std::vector< beast::IP::Endpoint >)> HandlerType
Definition Resolver.h:13
void resolve(std::vector< std::string > const &names, Handler handler)
resolve all hostnames on the list
Definition Resolver.h:36
virtual void resolve(std::vector< std::string > const &names, HandlerType const &handler)=0
virtual void stop()=0
Issue a synchronous stop request.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5