net/StaticSocketAddress: add method GetSteadyPart()

This commit is contained in:
Max Kellermann 2023-08-30 10:33:47 +02:00 committed by Max Kellermann
parent 35cfa6efa3
commit 339b9f6e7b

View File

@ -116,6 +116,11 @@ public:
bool SetPort(unsigned port) noexcept; bool SetPort(unsigned port) noexcept;
#endif #endif
[[gnu::pure]]
std::span<const std::byte> GetSteadyPart() const noexcept {
return SocketAddress{*this}.GetSteadyPart();
}
[[gnu::pure]] [[gnu::pure]]
bool operator==(SocketAddress other) const noexcept { bool operator==(SocketAddress other) const noexcept {
return (SocketAddress)*this == other; return (SocketAddress)*this == other;