25#include <asio/ip/address.hpp>
26#include <asio/ip/basic_endpoint.hpp>
27#include <fmt/format.h>
28#include <fmt/ostream.h>
42 return address_.address().to_string();
67format_context::iterator
68formatter<msgpack_rpc::addresses::TCPAddress>::format(
70 format_context& context)
const {
71 return fmt::format_to(context.out(),
"{}://{}",
Class of addresses of TCP.
std::uint16_t port_number() const
Get the port number.
bool operator!=(const TCPAddress &right) const
Compare with an address.
AsioTCPAddress address_
Address in asio library.
bool operator==(const TCPAddress &right) const
Compare with an address.
std::string ip_address() const
Get the IP address.
URI to_uri() const override
Convert to a URI.
std::string to_string() const override
Convert to a string specifying URI.
TCPAddress(std::string_view ip_address, std::uint16_t port_number)
Constructor.
const AsioTCPAddress & asio_address() const
Get the address in asio library.
Class of URIs (Uniform Resource Identifiers) to specify endpoints in this library.
Namespace of fmt library.
constexpr std::string_view TCP_SCHEME
Scheme of TCP.
asio::ip::tcp::endpoint AsioTCPAddress
Type of addresses of TCP in asio library.
Definition of constants of schemes.
Definition of TCPAddress.
std::ostream & operator<<(std::ostream &stream, const msgpack_rpc::addresses::URI &uri)
Format a URI.