mirror of
https://github.com/matrix-construct/construct
synced 2024-10-02 13:48:53 +02:00
ircd::net: Use ip to test ipport falsiness; typedef a resource record vector.
This commit is contained in:
parent
95c6f69e5d
commit
66ab3d85a5
2 changed files with 3 additions and 2 deletions
|
@ -21,7 +21,8 @@ namespace ircd::net::dns
|
||||||
{
|
{
|
||||||
struct opts extern const opts_default;
|
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_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_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 &)>;
|
using callback_ipport_one = std::function<void (std::exception_ptr, const hostport &, const ipport &)>;
|
||||||
|
|
|
@ -106,7 +106,7 @@ inline ircd::net::ipport::operator
|
||||||
bool()
|
bool()
|
||||||
const
|
const
|
||||||
{
|
{
|
||||||
return std::get<PORT>(*this) != 0;
|
return host6(*this) != uint128_t(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline ircd::uint128_t &
|
inline ircd::uint128_t &
|
||||||
|
|
Loading…
Reference in a new issue