MySQL 8.4.2
Source Code Documentation
Dns_srv_data Class Reference

A RFC2782 compliant SRV records storage. More...

#include <dns_srv_data.h>

Classes

class  Dns_entry
 

Public Member Functions

void clear ()
 
void add (const std::string &host, unsigned port, unsigned priority, unsigned weight)
 
bool pop_next (std::string &host, unsigned &port)
 

Private Types

using dns_entry_list_t = std::list< Dns_entry >
 
using dns_entry_data_t = std::map< unsigned, Dns_srv_data::dns_entry_list_t >
 

Private Attributes

dns_entry_data_t data_
 

Detailed Description

A RFC2782 compliant SRV records storage.

Stores host/port/weight/priority entries into a data structure that then allows retrieving these via the Dns_srv_data::pop_next() method.

Entries can be stored by calling Dns_srv_data::add() in any order.

This usage pattern is roughly as follows:

  1. Dns_srv_data construct
  2. one or more Dns_srv_data::add()
  3. one or more Dns_srv_data::pop_next()
  4. Dns_srv_data destructor
See also
mysql_real_connect_dns_srv

Member Typedef Documentation

◆ dns_entry_data_t

◆ dns_entry_list_t

using Dns_srv_data::dns_entry_list_t = std::list<Dns_entry>
private

Member Function Documentation

◆ add()

void Dns_srv_data::add ( const std::string &  host,
unsigned  port,
unsigned  priority,
unsigned  weight 
)
inline

◆ clear()

void Dns_srv_data::clear ( )
inline

◆ pop_next()

bool Dns_srv_data::pop_next ( std::string &  host,
unsigned &  port 
)
inline

Member Data Documentation

◆ data_

dns_entry_data_t Dns_srv_data::data_
private

The documentation for this class was generated from the following file: