From 1b684971c3b591538c3ba0d3343ec76559f10203 Mon Sep 17 00:00:00 2001 From: Johnny Richard Date: Thu, 7 Apr 2022 14:49:44 +0200 Subject: server.c: Move accept syscall to server_listen function --- server.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'server.h') diff --git a/server.h b/server.h index 1b788dd..0fa4f5b 100644 --- a/server.h +++ b/server.h @@ -1,12 +1,32 @@ +/* + * Papo IRC Server + * Copyright (C) 2021 Johnny Richard + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ #ifndef SERVER_H #define SERVER_H #include +#include typedef struct server { int fd; + bool running; } server_t; server_t server_create(uint32_t port); +void server_listen(server_t *server); #endif /* SERVER_H */ -- cgit v1.2.3