roar
Loading...
Searching...
No Matches
Namespaces | Functions
resolve.hpp File Reference
#include <boost/asio/ip/tcp.hpp>
#include <boost/system/error_code.hpp>
#include <string>
#include <stdexcept>
#include <algorithm>
#include <vector>
Include dependency graph for resolve.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Roar
 
namespace  Roar::Dns
 

Functions

template<typename Protocol = boost::asio::ip::tcp, typename FunctionT >
void Roar::Dns::resolveAll (boost::asio::any_io_executor context, std::string const &host, std::string const &port, FunctionT &&onResolveDone, boost::asio::ip::resolver_base::flags flags={})
 Resolves to a set of possible endpoints. Useful for clients that can try all and connect to one that works.
 
template<typename Protocol = boost::asio::ip::tcp, typename FunctionT >
void Roar::Dns::resolveAll (boost::asio::any_io_executor context, std::string const &host, std::string const &port, FunctionT &&onResolveDone, boost::system::error_code &ec, boost::asio::ip::resolver_base::flags flags={})
 Resolves to a set of possible endpoints. Useful for clients that can try all and connect to one that works. Does not throw, but rather sets ec.
 
template<typename Protocol = boost::asio::ip::tcp, typename FunctionT >
void Roar::Dns::resolveAll (boost::asio::any_io_executor context, std::string const &host, unsigned short port, FunctionT &&onResolveDone, boost::system::error_code &ec, boost::asio::ip::resolver_base::flags flags={})
 See other overload, this one just takes an unsigned short.
 
template<typename Protocol = boost::asio::ip::tcp>
void Roar::Dns::resolveAll (boost::asio::any_io_executor context, std::string const &host, std::string const &port, std::function< void(typename Protocol::resolver::iterator, typename Protocol::resolver::iterator)> onResolveDone, boost::asio::ip::resolver_base::flags flags={})
 Resolves to a set of possible endpoints. Useful for clients that can try all and connect to one that works.
 
template<typename ExecutorType , typename PickerFunctionT , typename Protocol = boost::asio::ip::tcp>
Protocol::resolver::endpoint_type Roar::Dns::resolveSelect (ExecutorType &&executor, std::string const &host, std::string const &port, PickerFunctionT &&picker, boost::asio::ip::resolver_base::flags flags={})
 Resolves a host and port and calls the passed function with all results and then returns what picker returns.
 
template<typename ExecutorType , typename PickerFunctionT , typename Protocol = boost::asio::ip::tcp>
Protocol::resolver::endpoint_type Roar::Dns::resolveSelect (ExecutorType &&executor, std::string const &host, unsigned short port, PickerFunctionT &&picker, boost::asio::ip::resolver_base::flags flags={})
 Resolves a host and port and calls the passed function with all results and then returns what picker returns. See the other overload. This one only differs by the port, which is an unsigned short.
 
template<typename ExecutorType , typename Protocol = boost::asio::ip::tcp>
Protocol::resolver::endpoint_type Roar::Dns::resolveSingle (ExecutorType &&executor, std::string const &host, std::string const &port, bool preferIpv4=false, boost::asio::ip::resolver_base::flags flags={})
 Like resolve but picks one of the addresses. Will sort after ipv4/ipv6.
 
template<typename ExecutorType , typename Protocol = boost::asio::ip::tcp>
Protocol::resolver::endpoint_type Roar::Dns::resolveSingle (ExecutorType &&executor, std::string const &host, unsigned short port, bool preferIpv4=false, boost::asio::ip::resolver_base::flags flags={})
 This overload only differs from the other one by taking an unsigned short as the port.