net/SocketAddress: add method GetLocalRaw()
This commit is contained in:
@@ -41,6 +41,8 @@
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
struct StringView;
|
||||
|
||||
/**
|
||||
* An OO wrapper for struct sockaddr.
|
||||
*/
|
||||
@@ -94,6 +96,17 @@ public:
|
||||
return GetFamily() != AF_UNSPEC;
|
||||
}
|
||||
|
||||
#ifdef HAVE_UN
|
||||
/**
|
||||
* Extract the local socket path (which may begin with a null
|
||||
* byte, denoting an "abstract" socket). The return value's
|
||||
* "size" attribute includes the null terminator. Returns
|
||||
* nullptr if not applicable.
|
||||
*/
|
||||
gcc_pure
|
||||
StringView GetLocalRaw() const noexcept;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_TCP
|
||||
/**
|
||||
* Is this the IPv6 wildcard address (in6addr_any)?
|
||||
|
Reference in New Issue
Block a user