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