summaryrefslogtreecommitdiff
path: root/server.h
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2020-06-22 01:41:52 +0200
committerDavid Härdeman <david@hardeman.nu>2020-06-22 01:41:52 +0200
commit94bbdce6b742ab2f62cfa9513e13f27a0f78973b (patch)
tree3c420e08e99c8921a389e78610a6006e2127a77f /server.h
parent3ac1a2e3595ab186d3cf752f1ae5e165684aab0a (diff)
Split idle into top-level task and per-server tasks
Diffstat (limited to 'server.h')
-rw-r--r--server.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/server.h b/server.h
index 46fac3f..b104ef1 100644
--- a/server.h
+++ b/server.h
@@ -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);