diff options
author | David Härdeman <david@hardeman.nu> | 2020-06-22 01:41:52 +0200 |
---|---|---|
committer | David Härdeman <david@hardeman.nu> | 2020-06-22 01:41:52 +0200 |
commit | 94bbdce6b742ab2f62cfa9513e13f27a0f78973b (patch) | |
tree | 3c420e08e99c8921a389e78610a6006e2127a77f /server.h | |
parent | 3ac1a2e3595ab186d3cf752f1ae5e165684aab0a (diff) |
Split idle into top-level task and per-server tasks
Diffstat (limited to 'server.h')
-rw-r--r-- | server.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -62,7 +62,9 @@ struct server { struct uring_task_buf ann_buf; /* For checking idle status */ - struct idle *idle; + struct uring_task idle_task; + struct connection idle_conn; + struct uring_task_buf idle_buf; unsigned idle_timeout; unsigned idle_count; @@ -83,6 +85,11 @@ bool server_start(struct cfg *cfg, struct server *server); bool server_stop(struct cfg *cfg, struct server *server); +void server_set_active_players(struct cfg *cfg, struct server *server, + int count); + +bool server_idle_check(struct cfg *cfg, struct server *server); + bool server_announce(struct cfg *cfg, struct server *server, int fd); bool server_commit(struct cfg *cfg, struct server *server); |