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
1 changed files with 5 additions and 0 deletions

View File

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