diff options
author | fschildt <florian.schildt@protonmail.com> | 2025-08-22 15:23:11 +0200 |
---|---|---|
committer | fschildt <florian.schildt@protonmail.com> | 2025-08-22 15:23:11 +0200 |
commit | 2050c0e0576f05156f192aa4caf48834d2f28b14 (patch) | |
tree | ee58bd35b0df0a1bacfbc9700ed99ce80c99294e /src/client/server_connection.h |
Diffstat (limited to 'src/client/server_connection.h')
-rw-r--r-- | src/client/server_connection.h | 27 |
1 files changed, 27 insertions, 0 deletions
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 <basic/basic.h> +#include <crypto/rsa.h> +#include <os/os.h> +#include <messages/messages.h> + +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 |