mpd/src/net/ToString.hxx

25 lines
502 B
C++
Raw Normal View History

// SPDX-License-Identifier: BSD-2-Clause
// author: Max Kellermann <max.kellermann@gmail.com>
2023-09-18 22:01:39 +02:00
#pragma once
#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]]
std::string
ToString(SocketAddress address) noexcept;
/**
* Generates the string representation of a #SocketAddress into the
* specified buffer, without the port number.
*/
[[gnu::pure]]
std::string
HostToString(SocketAddress address) noexcept;