From 5e1ae8b33873661b669eda509fcd000f8a964126 Mon Sep 17 00:00:00 2001 From: kartofen Date: Thu, 26 Jan 2023 14:58:09 +0200 Subject: very simple work withs html based on file path --- src/server.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/server.h (limited to 'src/server.h') diff --git a/src/server.h b/src/server.h new file mode 100644 index 0000000..f5107b5 --- /dev/null +++ b/src/server.h @@ -0,0 +1,17 @@ +#ifndef SERVER_H +#define SERVER_H + +typedef struct sock_t sock_t; +struct sock_t; + +int server_start(char *port, sock_t *sock); +int server_accept(sock_t *sock, sock_t *conn); + +ssize_t server_send(sock_t *sock, char *buf, size_t sz); +ssize_t server_recv(sock_t *sock, char *buf, size_t sz); +char *server_connection_ip(sock_t *conn); + +sock_t *server_sock_create(); +void server_sock_close(sock_t *s); + +#endif -- cgit v1.2.3