From 1ce4acb85a3bcb953c0f9cc91d2edc855969948b Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 22 Aug 2022 13:40:27 +0200 Subject: add some code A basic client-server app, the client sends commands as an array of strings. Hopefully I didn't mess up, and hopefully it'll be useful. --- 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..8a46314 --- /dev/null +++ b/src/server.h @@ -0,0 +1,17 @@ +#ifndef __SERVER_H__ +#define __SERVER_H__ + +struct settings { + const char *port; +}; + +struct server { + int fd; +}; + +int server_create(struct server *, const struct settings *); +void server_destroy(const struct server *); + +int server_main(const struct server *); + +#endif -- cgit v1.2.3