0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-01 11:12:51 +01:00

ircd::client: Function to count clients connected from remote addr.

This commit is contained in:
Jason Volk 2018-09-01 21:19:15 -07:00
parent 8a0749b232
commit e3262a7b31
2 changed files with 7 additions and 0 deletions

View file

@ -37,6 +37,7 @@ struct ircd::client
static ctx::pool pool; static ctx::pool pool;
static uint64_t ctr; // monotonic static uint64_t ctr; // monotonic
static size_t count(const net::ipport &remote);
static void interrupt_all(); static void interrupt_all();
static void close_all(); static void close_all();
static void wait_all(); static void wait_all();

View file

@ -230,6 +230,12 @@ ircd::client::wait_all()
pool.join(); pool.join();
} }
size_t
ircd::client::count(const net::ipport &remote)
{
return client::map.count(remote);
}
ircd::parse::read_closure ircd::parse::read_closure
ircd::read_closure(client &client) ircd::read_closure(client &client)
{ {