From 53a085962964f4db118619a5e2156c901aba55a6 Mon Sep 17 00:00:00 2001 From: Plex Date: Mon, 25 Oct 2021 16:35:18 +0200 Subject: serialization underway --- mctypes.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mctypes.h') diff --git a/mctypes.h b/mctypes.h index dc18063..8230b53 100644 --- a/mctypes.h +++ b/mctypes.h @@ -16,7 +16,7 @@ typedef struct { typedef struct { varint protocol_version; string server_address; - unsigned int server_port; + unsigned short server_port; varint next_state; }__attribute__((packed)) handshake; @@ -26,3 +26,5 @@ typedef long pong; int readVarInt(varint x); varint writeVarInt(unsigned int x); +size_t serializeHandshake(handshake hs, void *buf); +size_t serializePacket(packet p, void *buf); -- cgit v1.2.3