0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 00:32:35 +01:00

ircd::net: Add listener::name() interface method.

This commit is contained in:
Jason Volk 2018-08-30 19:15:28 -07:00
parent e5f94ed704
commit 60b3cd828e
2 changed files with 18 additions and 0 deletions

View file

@ -29,6 +29,7 @@ struct ircd::net::listener
public:
explicit operator json::object() const;
string_view name() const;
listener(const string_view &name,
const json::object &options,
@ -57,6 +58,7 @@ struct ircd::net::listener_udp
public:
explicit operator json::object() const;
string_view name() const;
datagram &operator()(datagram &);

View file

@ -933,6 +933,14 @@ noexcept
acceptor->join();
}
ircd::string_view
ircd::net::listener::name()
const
{
assert(acceptor);
return acceptor->name;
}
ircd::net::listener::operator
ircd::json::object()
const
@ -988,6 +996,14 @@ ircd::net::listener_udp::operator()(datagram &datagram)
return acceptor->operator()(datagram);
}
ircd::string_view
ircd::net::listener_udp::name()
const
{
assert(acceptor);
return acceptor->name;
}
ircd::net::listener_udp::operator
ircd::json::object()
const