net/SocketAddress: add GetSteadyPart()
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
template<typename T> struct ConstBuffer;
|
||||
struct StringView;
|
||||
|
||||
/**
|
||||
@@ -127,6 +128,16 @@ public:
|
||||
unsigned GetPort() const noexcept;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Return a buffer pointing to the "steady" portion of the
|
||||
* address, i.e. without volatile parts like the port number.
|
||||
* This buffer is useful for hashing the address, but not so
|
||||
* much for anything else. Returns nullptr if the address is
|
||||
* not supported.
|
||||
*/
|
||||
gcc_pure
|
||||
ConstBuffer<void> GetSteadyPart() const noexcept;
|
||||
|
||||
gcc_pure
|
||||
bool operator==(const SocketAddress other) const noexcept;
|
||||
|
||||
|
Reference in New Issue
Block a user