roar
|
Functions | |
template<typename Protocol = boost::asio::ip::tcp, typename FunctionT > | |
void | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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. | |
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.
Protocol | ip/udp |
FunctionT | Type of function to call with each endpoint. |
context | Io executor. |
host | The host to resolve |
port | The port to resolve |
onResolveDone | Function that is called with all results. |
flags | Flags to pass to the resolver. |
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.
Protocol | ip/udp |
FunctionT | Type of function to call with each endpoint. |
context | Io executor. |
host | The host to resolve |
port | The port to resolve |
onResolveDone | Function that is called with all results. |
ec | Will be set to an error if resolve fails. |
flags | Flags to pass to the resolver. |
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.
Protocol | ip/udp |
FunctionT | Type of function to call with each endpoint. |
context | Io executor. |
host | The host to resolve |
port | The port to resolve |
onResolveDone | Function that is called with all results. |
flags | Flags to pass to the resolver. |
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.
flags | Flags to pass to the resolver. |
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.
ExecutorType | Deduced. The type of the io executor (likely any_io_executor) |
PickerFunctionT | A function that takes a vector<typename ResolverType::endpoint_type> and returns typename ResolverType::endpoint_type |
Protocol | ip or udp? |
executor | Any executor type that boost::asio::ip::PROTOCOL::resolver can take. |
host | The host to resolve |
port | The port to resolve |
picker | A picker function. |
flags | Flags to pass to the resolver. |
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.
flags | Flags to pass to the resolver. |
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.
ExecutorType | Deduced. The type of the io executor (likely any_io_executor) |
Protocol | ip or udp? |
executor | Any executor type that boost::asio::ip::PROTOCOL::resolver can take. |
host | The host to resolve |
port | The port to resolve |
preferIpv4 | Prefer to pick an ipv4 address? (Default is false) |
flags | Flags to pass to the resolver. |
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.
flags | Flags to pass to the resolver. |