aboutsummaryrefslogtreecommitdiff
path: root/mctypes.h
diff options
context:
space:
mode:
authorPlex <thinkplex@riseup.net>2021-10-25 03:41:36 +0200
committerPlex <thinkplex@riseup.net>2021-10-25 03:41:36 +0200
commitd33fabf0c5e1ea9a4e3118836dc459fa971d7a1d (patch)
treef830f516ee909f06a9ea6be6733efe159937001c /mctypes.h
parenta5099fdeec6f5e45d88108e28e7c00aa1cf3573c (diff)
socket connected
Diffstat (limited to 'mctypes.h')
-rw-r--r--mctypes.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/mctypes.h b/mctypes.h
index eb19867..dc18063 100644
--- a/mctypes.h
+++ b/mctypes.h
@@ -10,8 +10,19 @@ typedef struct {
typedef struct {
varint length;
varint id;
- char *data;
+ void *data;
} packet;
+typedef struct {
+ varint protocol_version;
+ string server_address;
+ unsigned int server_port;
+ varint next_state;
+}__attribute__((packed)) handshake;
+
+
+typedef long ping;
+typedef long pong;
+
int readVarInt(varint x);
varint writeVarInt(unsigned int x);