A host:port pair that resolves to a TAddress.
More...
#include <resolver.hpp>
Public Member Functions | |
| THostPort (const std::string &hostPort) | |
Parses a "host:port" string. | |
| THostPort (const std::string &host, int port) | |
| Constructs from separate host and port values. | |
| TFuture< TAddress > | Resolve (TResolver &resolver) |
Resolves the host to a TAddress using the given resolver. | |
| const std::string | ToString () const |
| const std::string & | GetHost () const |
| int | GetPort () const |
A host:port pair that resolves to a TAddress.
If host is a literal IPv4 or IPv6 address, Resolve() returns immediately without querying DNS. Otherwise it delegates to TResolver::Resolve().
Resolves the host to a TAddress using the given resolver.
Skips DNS if host is already a literal IP. Throws std::runtime_error if DNS returns no addresses.