added methods for Client to send and receive messages

This commit is contained in:
2026-01-04 00:53:35 +05:00
parent 90e21bc5ae
commit 0132e71c88
13 changed files with 229 additions and 104 deletions

View File

@@ -3,6 +3,7 @@
#include "cryptography/AES.h"
#include "cryptography/RSA.h"
#include "network/encrypted_sockets.h"
#include "network/tcp-chat-protocol/v1.h"
typedef struct ServerConnection ServerConnection;
@@ -12,7 +13,6 @@ typedef struct Client {
ServerConnection* conn;
} Client;
typedef struct ServerConnection {
Client* client;
EndpointIPv4 server_end;
@@ -23,6 +23,7 @@ typedef struct ServerConnection {
EncryptedSocketTCP sock;
i64 session_id;
i64 user_id;
MessageBlock received_message_block;
} ServerConnection;
/// @param server_addr_cstr