summaryrefslogtreecommitdiff
path: root/net.h
diff options
context:
space:
mode:
authorcflip <cflip@cflip.net>2023-05-30 16:18:31 -0600
committercflip <cflip@cflip.net>2023-05-30 16:18:31 -0600
commit40b66da398695590f82594bb92fd824bfdb44836 (patch)
treecedd9dbd2ecb647dc409405e7375192bd2bd62c5 /net.h
parent51c9a57339b499d3c0210dac26537ca14a01f995 (diff)
Move request handling code out of net.c and into the main file
Diffstat (limited to 'net.h')
-rw-r--r--net.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/net.h b/net.h
index 8b9e72a..92f61c4 100644
--- a/net.h
+++ b/net.h
@@ -1,10 +1,12 @@
#ifndef _H_NET
#define _H_NET
-#define CFWS_MAXCONN 10 /* Max connections allowed by listen(). */
-#define CFWS_MAXREAD 1024 /* Size of buffer used for reading from client. */
+#define CFWS_NET_MAXCONN 10 /* Max connections allowed by listen(). */
+#define CFWS_NET_MAXREAD 1024 /* Size of buffer used for reading from client. */
-int initialize_server(int);
-void handle_connection(int);
+#include "http.h"
+
+int net_init_server(int);
+struct http_request net_next_request(int serverfd, int *clientfd);
#endif