0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 18:22:50 +01:00

ircd::net::listener: Add cast for internal acceptor access.

This commit is contained in:
Jason Volk 2019-03-13 17:32:16 -07:00
parent 1f35e9c57e
commit 8daddfb84a
2 changed files with 18 additions and 0 deletions

View file

@ -33,6 +33,9 @@ struct ircd::net::listener
std::shared_ptr<net::acceptor> acceptor;
public:
operator const net::acceptor &() const;
operator net::acceptor &();
explicit operator json::object() const;
string_view name() const;

View file

@ -1012,6 +1012,21 @@ const
return acceptor->opts;
}
ircd::net::listener::operator
net::acceptor &()
{
assert(acceptor);
return *acceptor;
}
ircd::net::listener::operator
const net::acceptor &()
const
{
assert(acceptor);
return *acceptor;
}
//
// listener_udp
//