summaryrefslogtreecommitdiff
path: root/server.h
diff options
context:
space:
mode:
authorJohnny Richard <johnny@johnnyrichard.com>2022-04-07 14:49:44 +0200
committerJohnny Richard <johnny@johnnyrichard.com>2022-04-07 14:54:39 +0200
commit1b684971c3b591538c3ba0d3343ec76559f10203 (patch)
tree575f66a3b7543cc970eceee1ec8ed8319fd4599e /server.h
parent33e14b74df70ecbfcdb56b71a0ea7d4f1e05b1f4 (diff)
server.c: Move accept syscall to server_listen function
Diffstat (limited to 'server.h')
-rw-r--r--server.h20
1 files changed, 20 insertions, 0 deletions
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 <https://www.gnu.org/licenses/>.
+ */
#ifndef SERVER_H
#define SERVER_H
#include <stdint.h>
+#include <stdbool.h>
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 */