|
Net++
A class-based C++ encapsulation over the POSIX Sockets API
|
#include <resolver.hpp>
Public Member Functions | |
| Resolver (std::string hostname, std::string service) | |
| The Resolver constructor. | |
| QueryResults | results () const |
| Returns attribute query_results_. | |
| QueryResults | udp_nodes () const |
| Returns only UDP nodes in query_results_. | |
| QueryResults | tcp_nodes () const |
| Returns only TCP nodes in query_results. | |
| tcp::Connection::connection_ptr | try_connect_tcp () |
| Attempts to connect to the target host using protocol TCP. | |
| void | try_connect_udp () |
| Attempts to connect to the target host using protocol UDP. | |
| void | print_results () const |
| prints query results to stdout | |
The Resolver class.
Encapsulates getaddrinfo functionality, providing methods to filter, print, and connect to results
| conn_resolver::Resolver::Resolver | ( | std::string | hostname, |
| std::string | service | ||
| ) |
The Resolver constructor.
| hostname | the host to connect to |
| service | the desired service of the target host |
| void conn_resolver::Resolver::print_results | ( | ) | const |
prints query results to stdout
| QueryResults conn_resolver::Resolver::results | ( | ) | const |
Returns attribute query_results_.
| QueryResults conn_resolver::Resolver::tcp_nodes | ( | ) | const |
Returns only TCP nodes in query_results.
| tcp::Connection::connection_ptr conn_resolver::Resolver::try_connect_tcp | ( | ) |
Attempts to connect to the target host using protocol TCP.
| void conn_resolver::Resolver::try_connect_udp | ( | ) |
Attempts to connect to the target host using protocol UDP.
| QueryResults conn_resolver::Resolver::udp_nodes | ( | ) | const |
Returns only UDP nodes in query_results_.