added SSL

This commit is contained in:
Lorenzo Torres 2026-01-08 14:37:28 +01:00
parent d9ee2c56f2
commit 670e38a105
8 changed files with 142 additions and 22 deletions

20
PROTOCOL Normal file
View file

@ -0,0 +1,20 @@
for client:
server parses packets from left to right like this:
[u16 length][u8 type][char *data]
length: the length of the entire packet
type:
PACKET_ERROR = 0
PACKET_REGISTER = 1
PACKET_AUTHENTICATE = 2
PACKET_JOIN = 3
PACKET_TEXT = 4
PACKET_LEAVE = 5
data: bytes of data, what it could represent depends on the packet type
(following layouts are layouts for data byte array)
PACKET_REGISTER : [char username[20]][char password[20]]
PACKET_AUTHENTICATE : [char username[20]][char password[20]]
PACKET_JOIN : []
PACKET_TEXT :
PACKET_LEAVE :