* Get the address as a string, e.g. 127.0.0.1:12345. * @param with_family whether to add the family (e.g. IPvX). * @return the address */
| 93 | * @return the address |
| 94 | */ |
| 95 | std::string NetworkAddress::GetAddressAsString(bool with_family) |
| 96 | { |
| 97 | return fmt::format(fmt::runtime(GetAddressFormatString(this->GetAddress()->ss_family, with_family)), this->GetHostname(), this->GetPort()); |
| 98 | } |
| 99 | |
| 100 | /** |
| 101 | * Helper function to resolve without opening a socket. |
no test coverage detected