From 2050c0e0576f05156f192aa4caf48834d2f28b14 Mon Sep 17 00:00:00 2001 From: fschildt Date: Fri, 22 Aug 2025 15:23:11 +0200 Subject: first commit --- src/client/server_connection.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/client/server_connection.h (limited to 'src/client/server_connection.h') diff --git a/src/client/server_connection.h b/src/client/server_connection.h new file mode 100644 index 0000000..e5b7167 --- /dev/null +++ b/src/client/server_connection.h @@ -0,0 +1,27 @@ +#ifndef SERVER_CONNECTION_H +#define SERVER_CONNECTION_H + +#include +#include +#include +#include + +struct Fscord; + +typedef enum { + SERVER_CONNECTION_NOT_ESTABLISHED, + SERVER_CONNECTION_ESTABLISHING, + SERVER_CONNECTION_ESTABLISHED +} ServerConnectionStatus; + +void server_connection_create(Arena *arena, struct Fscord *fscord); + +ServerConnectionStatus server_connection_get_status(void); +void server_connection_establish(char *address, u16 port, EVP_PKEY *server_rsa_pub); +void server_connection_terminate(void); +b32 server_connection_handle_events(void); + +void send_c2s_login(String32 *username, String32 *password); +void send_c2s_chat_message(String32 *content); + +#endif // SERVER_CONNECTION_H -- cgit v1.2.3