Commit graph

158 commits

Author SHA1 Message Date
ChillerDragon 1b445c3a12 Add connless fields to initialize 2023-05-10 09:05:48 +02:00
ChillerDragon ff4c28fd42 Integrate connless messages into packet.parse7() 2023-05-09 20:39:13 +02:00
ChillerDragon 7874d769aa Start working on connection less messages 2023-05-09 17:06:40 +02:00
ChillerDragon 2ef0b07282 Add message_type field for control, game and system messages 2023-05-09 11:42:19 +02:00
ChillerDragon 3b7d46e5a7 First working version of map download example 2023-05-09 10:04:37 +02:00
ChillerDragon 6c87523d13 Continue working on download map example (unfinished) 2023-05-08 17:29:33 +02:00
ChillerDragon 15e9836195 Compare packed info against bytes in test 2023-05-08 10:31:44 +02:00
ChillerDragon 74db92de6e Release 0.6.0 2023-05-08 09:52:40 +02:00
ChillerDragon 7a367acef3 Fix python caching flags of old packets 2023-05-08 09:51:03 +02:00
ChillerDragon f9cb346ab1 Release 0.5.1 2023-05-08 09:09:19 +02:00
ChillerDragon b3406be723 Better defaults for client version fields 2023-05-08 08:58:27 +02:00
ChillerDragon ffbc603ad6 Reformat feature table 2023-05-07 15:09:56 +02:00
ChillerDragon 53a3a4874a Start working on download map example 2023-05-07 15:04:18 +02:00
ChillerDragon c49d1de042 Add NET_MAX_PACKETSIZE constant
This can come in handy for udp recv calls
2023-05-07 15:02:23 +02:00
ChillerDragon 94d70fd60a Add sys info test 2023-05-07 15:02:02 +02:00
ChillerDragon 1d29e96c1b Auto compute chunk size by default 2023-05-07 14:07:13 +02:00
ChillerDragon 5a85dfd7a0 Test pcap example 2023-05-07 12:55:19 +02:00
ChillerDragon 24d45bc0ab Release 0.5.0 2023-04-30 13:12:25 +02:00
ChillerDragon edce9e01d5 Bump progress 2023-04-30 13:10:47 +02:00
ChillerDragon 781248ae79 Support packing control packets 2023-04-30 13:08:33 +02:00
ChillerDragon 390e470f3b Add imports and result to example 2023-04-29 09:31:35 +02:00
ChillerDragon 8d639b57b8 Note about defaults (closed #8) 2023-04-29 09:25:47 +02:00
ChillerDragon 425506d2a3 Implement packing full tw packets (no ctrl messages yet) 2023-04-29 09:07:06 +02:00
ChillerDragon 06b751940f Fix chunk header packing 2023-04-23 11:46:25 +02:00
ChillerDragon f0fd825879 Start working on packet and chunk header packing 2023-04-16 19:17:05 +02:00
ChillerDragon 18dd35f4fa Create chunk header instance for every message 2023-04-16 16:51:28 +02:00
ChillerDragon 6a351073d3 Include ids in message classes 2023-04-16 16:06:23 +02:00
ChillerDragon 65cac66724 Add more types to test
This is highlighting the problem of
https://gitlab.com/teeworlds-network/twnet_parser/-/issues/1

Every lib user that wants to use types needs to do a cast
to access the properties of messages
2023-04-16 11:44:09 +02:00
ChillerDragon 4f540fead1 Add some types to packet test 2023-04-16 11:39:30 +02:00
ChillerDragon 1fd099c3de Intentionally keep enums ints
https://gitlab.com/teeworlds-network/twnet_parser/-/issues/7
2023-04-16 11:25:31 +02:00
ChillerDragon 67c54c4be4 Use python enums for enums
I played a bit with getting the text instead
of the magic number in the string representation
but everything I tried got a bit ugly
2023-04-16 10:53:29 +02:00
ChillerDragon e4ab0a7791 Make 0 member msgs look nicer 2023-04-16 09:40:12 +02:00
ChillerDragon 90b43608b9 Use named default for enums and move enum file 2023-04-16 09:28:36 +02:00
ChillerDragon 58051469f2 Start using classes in gen script to avoid globals 2023-04-16 08:52:03 +02:00
ChillerDragon 1767d05f4e Generate enums 2023-04-16 08:43:37 +02:00
ChillerDragon 8b0cce28be Expect the sha256 field to be 32 bytes 2023-04-16 08:15:55 +02:00
ChillerDragon e3411f7f98 Add pcap printer example 2023-04-09 17:02:35 +02:00
ChillerDragon a6ecf91e52 Release 0.4.0 2023-04-09 16:27:36 +02:00
ChillerDragon b9a719ece9 Add pack() method to PacketHeader class
Also removed unused PacketHeader size field
2023-04-09 16:22:35 +02:00
ChillerDragon 3b93a6bba2 Packing python bools as tw net bools just works
python handles bools more like the ints 0 and 1
and those are exactly the values the
teeworlds network protocol expects

I can totally see this breaking in python4
or a new mypy version

maybe one day a ``get_bool()`` could make sense
also for readability

but for now this should be stable as long as the
tests pass
2023-04-09 12:14:13 +02:00
ChillerDragon f1d562f25f Add snap single test 2023-04-09 12:03:16 +02:00
ChillerDragon 2b28e755bc Add support for the data size field 2023-04-09 11:44:43 +02:00
ChillerDragon 1ab907a5ae Delete .gitkeep 2023-04-08 18:38:41 +02:00
ChillerDragon 7dc9e6de14 Add 48 chunk rcon server response test 2023-04-08 18:30:46 +02:00
ChillerDragon 7a8dc63aee Document message parsing progress 2023-04-08 15:27:52 +02:00
ChillerDragon 2c22d3bd39 Finish skin change tests 2023-04-08 15:27:12 +02:00
ChillerDragon 559f63d033 Generate messages with array fields
This commit was fully automated by

		./scripts/generate_messages.py
2023-04-08 14:25:58 +02:00
ChillerDragon 822074ea47 Add support for generating array chunk fields 2023-04-08 14:24:44 +02:00
ChillerDragon 7e7f419597 More skin change tests 2023-04-07 18:14:41 +02:00
ChillerDragon e24b3959ce Start working on skin change test 2023-04-07 16:57:04 +02:00