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:
parent
1f35e9c57e
commit
8daddfb84a
2 changed files with 18 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
15
ircd/net.cc
15
ircd/net.cc
|
@ -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
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue