diff options
author | Plex <thinkplex@riseup.net> | 2021-10-24 22:50:22 +0200 |
---|---|---|
committer | Plex <thinkplex@riseup.net> | 2021-10-24 22:50:22 +0200 |
commit | dd1779c4c7581b0b863886371f891d9d545d6b27 (patch) | |
tree | 721db5e98337f206e3c20ef82db71ecd6fa3fede /mctypes.h | |
parent | a74a07ab26fbda8235011f2819a78a6f314a1ef2 (diff) |
writeVarInt
Diffstat (limited to 'mctypes.h')
-rw-r--r-- | mctypes.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mctypes.h b/mctypes.h new file mode 100644 index 0000000..3fe4a7f --- /dev/null +++ b/mctypes.h @@ -0,0 +1,18 @@ +#include <sys/types.h> +typedef u_int8_t *varint; +typedef u_int8_t *varlong; + +typedef struct { + varint length; + char *content; +} string; + +typedef struct { + varint length; + varint id; + char *data;; +} packet; + + +int writeVarInt(varint x); +varint writeVarInt(unsigned int x); |