21 Internet protocol [internet]

21.13 Class template ip::basic_endpoint [internet.endpoint]

21.13.2 ip::basic_endpoint members [internet.endpoint.members]

constexpr protocol_type protocol() const noexcept;

Returns: protocol_type::v6() if the expression this->address().is_v6() is true, otherwise protocol_type::v4().

constexpr ip::address address() const noexcept;

Returns: The address associated with the endpoint.

void address(const ip::address& addr) noexcept;

Postconditions: this->address() == addr.

constexpr port_type port() const noexcept;

Returns: The port number associated with the endpoint.

void port(port_type port_num) noexcept;

Postconditions: port() == port_num.