26#ifndef MYSQL_HARNESS_TCPADDRESS_INCLUDED
27#define MYSQL_HARNESS_TCPADDRESS_INCLUDED
31#include <system_error>
33#include "harness_export.h"
52 std::string
address()
const {
return addr_; }
54 uint16_t
port()
const {
return port_; }
64 std::string
str()
const;
102 const std::string &endpoint);
Defines an IP address with port number
Definition: tcp_address.h:40
uint16_t port_
TCP port.
Definition: tcp_address.h:89
friend bool operator==(const TCPAddress &left, const TCPAddress &right)
Compares two addresses for equality.
Definition: tcp_address.h:69
TCPAddress(std::string address, uint16_t tcp_port)
Definition: tcp_address.h:44
std::string addr_
Network name IP.
Definition: tcp_address.h:86
friend bool operator<(const TCPAddress &left, const TCPAddress &right)
Function for performing comparison of TCPAddresses.
Definition: tcp_address.h:76
uint16_t port() const
Definition: tcp_address.h:54
TCPAddress & operator=(TCPAddress &&other)=default
TCPAddress & operator=(const TCPAddress &other)=default
TCPAddress(const TCPAddress &other)=default
TCPAddress(TCPAddress &&other)=default
void port(uint16_t p)
Definition: tcp_address.h:56
std::string address() const
Definition: tcp_address.h:52
Definition: expected.h:284
const char * p
Definition: ctype-mb.cc:1235
static uint tcp_port
Definition: mysqladmin.cc:76
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1081
HARNESS_EXPORT stdx::expected< TCPAddress, std::error_code > make_tcp_address(const std::string &endpoint)
create TCPAddress from endpoint string.
Definition: tcp_address.cc:141
Definition: gcs_xcom_synode.h:64