0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-28 19:58:53 +02:00

ircd::net: Add single-string amalgam construction to ipport.

This commit is contained in:
Jason Volk 2019-03-24 19:17:05 -07:00
parent fe81c30806
commit 8e15e5d09b

View file

@ -57,6 +57,7 @@ struct ircd::net::ipport
template<class iparg> ipport(iparg&&, const uint16_t &port);
template<class iparg> ipport(iparg&&, const string_view &port);
ipport(const string_view &amalgam);
ipport();
};
@ -84,6 +85,14 @@ ircd::net::ipport::ipport()
}
{}
inline
ircd::net::ipport::ipport(const string_view &amalgam)
:std::pair<ipaddr, uint16_t>
{
rfc3986::host(amalgam), rfc3986::port(amalgam)
}
{}
template<class iparg>
ircd::net::ipport::ipport(iparg&& arg,
const string_view &port)