2023-03-06 14:42:04 +01:00
|
|
|
// SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
// author: Max Kellermann <max.kellermann@gmail.com>
|
2015-07-22 10:03:36 +02:00
|
|
|
|
2023-09-18 22:01:39 +02:00
|
|
|
#pragma once
|
2015-07-22 10:03:36 +02:00
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
class SocketAddress;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Converts the specified socket address into a string in the form
|
|
|
|
* "IP:PORT".
|
|
|
|
*/
|
2021-10-13 11:28:04 +02:00
|
|
|
[[gnu::pure]]
|
2015-07-22 10:03:36 +02:00
|
|
|
std::string
|
2017-05-08 14:44:49 +02:00
|
|
|
ToString(SocketAddress address) noexcept;
|
2015-07-22 10:03:36 +02:00
|
|
|
|
2021-10-14 14:25:20 +02:00
|
|
|
/**
|
|
|
|
* Generates the string representation of a #SocketAddress into the
|
|
|
|
* specified buffer, without the port number.
|
|
|
|
*/
|
|
|
|
[[gnu::pure]]
|
|
|
|
std::string
|
|
|
|
HostToString(SocketAddress address) noexcept;
|