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:
parent
fe81c30806
commit
8e15e5d09b
1 changed files with 9 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue