Represents a cached DNS result. Used by the ssl_connection class to store cached copies of dns lookups.
More...
#include <dns.h>
|
| addrinfo | addr |
| | Resolved address metadata.
|
| time_t | expire_timestamp |
| | Time at which this cache entry is invalidated.
|
| std::string | resolved_addr |
| | Resolved address as string. The metadata is needed to know what type of address it is. Do not do silly stuff like just looking to see if '.' is in it!
|
Represents a cached DNS result. Used by the ssl_connection class to store cached copies of dns lookups.
◆ get_connecting_address()
| const address_t dpp::dns_cache_entry::get_connecting_address |
( |
uint16_t | port | ) |
const |
|
nodiscard |
Get the address_t that corresponds to this cache entry for use when connecting with ::connect().
- Parameters
-
| port | Port number to connect to |
- Returns
- address_t prefilled with the IP and port number
◆ make_connecting_socket()
| socket dpp::dns_cache_entry::make_connecting_socket |
( |
| ) |
const |
|
nodiscard |
Allocate a socket file descriptor for the given dns address.
- Returns
- File descriptor ready for calling connect(), or INVALID_SOCKET on failure.
◆ size()
| int dpp::dns_cache_entry::size |
( |
| ) |
const |
|
nodiscard |
Get address length.
- Returns
- address length
◆ addr
| addrinfo dpp::dns_cache_entry::addr |
Resolved address metadata.
◆ expire_timestamp
| time_t dpp::dns_cache_entry::expire_timestamp |
Time at which this cache entry is invalidated.
◆ resolved_addr
| std::string dpp::dns_cache_entry::resolved_addr |
Resolved address as string. The metadata is needed to know what type of address it is. Do not do silly stuff like just looking to see if '.' is in it!