0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-30 15:58:20 +02:00

ircd::net: Use ip to test ipport falsiness; typedef a resource record vector.

This commit is contained in:
Jason Volk 2018-10-03 14:17:27 -07:00
parent 95c6f69e5d
commit 66ab3d85a5
2 changed files with 3 additions and 2 deletions

View file

@ -21,7 +21,8 @@ namespace ircd::net::dns
{
struct opts extern const opts_default;
using callback = std::function<void (std::exception_ptr, const hostport &, const vector_view<const rfc1035::record *> &)>;
using records = vector_view<const rfc1035::record *>;
using callback = std::function<void (std::exception_ptr, const hostport &, const records &)>;
using callback_A_one = std::function<void (std::exception_ptr, const hostport &, const rfc1035::record::A &)>;
using callback_SRV_one = std::function<void (std::exception_ptr, const hostport &, const rfc1035::record::SRV &)>;
using callback_ipport_one = std::function<void (std::exception_ptr, const hostport &, const ipport &)>;

View file

@ -106,7 +106,7 @@ inline ircd::net::ipport::operator
bool()
const
{
return std::get<PORT>(*this) != 0;
return host6(*this) != uint128_t(0);
}
inline ircd::uint128_t &