From b58103fffad4be486b800d3b30bb6620e97de7e4 Mon Sep 17 00:00:00 2001 From: achemin1 Date: Fri, 22 Jan 2021 14:46:28 +0100 Subject: [PATCH] feat : now detects and handle the disconnects oh clients --- server.c | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/server.c b/server.c index 459da6b..0fca7a7 100644 --- a/server.c +++ b/server.c @@ -1,3 +1,4 @@ +#define _GNU_SOURCE #include #include #include @@ -105,6 +106,16 @@ int serv_gestionClient(int s){ } +void removeSocket(struct pollfd descr[], int i, int length){ + for (int j=i;j%i$ %s\n", i+1, ligne); -sleep(1); } } -- libgit2 0.21.2