net/AllocatedSocketAddress: add methods IsV6Any(), IsV4Mapped()

This commit is contained in:
Max Kellermann 2019-02-19 12:51:24 +01:00
parent 864c87e6c0
commit 57633fbcb3

View File

@ -163,6 +163,14 @@ public:
#endif
#ifdef HAVE_TCP
bool IsV6Any() const noexcept {
return ((SocketAddress)*this).IsV6Any();
}
bool IsV4Mapped() const noexcept {
return ((SocketAddress)*this).IsV4Mapped();
}
/**
* Extract the port number. Returns 0 if not applicable.
*/