mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
ircd::client: Function to count clients connected from remote addr.
This commit is contained in:
parent
8a0749b232
commit
e3262a7b31
2 changed files with 7 additions and 0 deletions
|
@ -37,6 +37,7 @@ struct ircd::client
|
|||
static ctx::pool pool;
|
||||
static uint64_t ctr; // monotonic
|
||||
|
||||
static size_t count(const net::ipport &remote);
|
||||
static void interrupt_all();
|
||||
static void close_all();
|
||||
static void wait_all();
|
||||
|
|
|
@ -230,6 +230,12 @@ ircd::client::wait_all()
|
|||
pool.join();
|
||||
}
|
||||
|
||||
size_t
|
||||
ircd::client::count(const net::ipport &remote)
|
||||
{
|
||||
return client::map.count(remote);
|
||||
}
|
||||
|
||||
ircd::parse::read_closure
|
||||
ircd::read_closure(client &client)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue