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/client.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/client.h (limited to 'src/client.h') diff --git a/src/client.h b/src/client.h new file mode 100644 index 0000000..05dec85 --- /dev/null +++ b/src/client.h @@ -0,0 +1,18 @@ +#ifndef __CLIENT_H__ +#define __CLIENT_H__ + +struct settings { + const char *host; + const char *port; +}; + +struct client { + int fd; +}; + +int client_create(struct client *, const struct settings *); +void client_destroy(const struct client *); + +int client_main(const struct client *, int argc, char *argv[]); + +#endif -- cgit v1.2.3