From 1e2f3e437492ecc841bc9852ab46ce0e218e4723 Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Sun, 7 Jun 2020 23:41:54 +0200 Subject: Add basic support for checking idle status --- server.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'server.h') diff --git a/server.h b/server.h index a6936cd..2e431dc 100644 --- a/server.h +++ b/server.h @@ -26,6 +26,11 @@ struct server { struct msghdr mcast_msg; char mcast_buf[4096]; + /* For checking idle status */ + struct idle *idle; + unsigned idle_timeout; + unsigned idle_count; + struct uring_task task; struct list_head list; }; @@ -44,6 +49,8 @@ bool server_add_remote(struct cfg *cfg, struct server *scfg, bool server_add_local(struct cfg *cfg, struct server *scfg, struct sockaddr_in46 *local); +bool server_set_idle(struct cfg *cfg, struct server *scfg, uint16_t timeout); + bool server_set_port(struct cfg *cfg, struct server *scfg, uint16_t port); bool server_set_type(struct cfg *cfg, struct server *scfg, -- cgit v1.2.3