Commit graph

74 commits

Author SHA1 Message Date
ChillerDragon f6a0c56b9b Comment out failing snapshot test
Some checks failed
Go / build (push) Has been cancelled
Go / build-readme (push) Has been cancelled
Go / test (push) Has been cancelled
Go / format (push) Has been cancelled
Go / teeworlds (push) Has been cancelled
2024-06-25 12:22:05 +08:00
ChillerDragon 94c6798e8b Refactor unpacker and add some more snap tests 2024-06-25 12:19:51 +08:00
ChillerDragon 0492ca26ec Fix sys/game check in CI 2024-06-25 12:18:42 +08:00
ChillerDragon 01adf6a404 Unpack some more messages (not complete yet) 2024-06-25 12:16:08 +08:00
ChillerDragon 6c36291648 Check for invalid sys/game flag in CI 2024-06-25 12:15:23 +08:00
ChillerDragon 3ecb2a32aa Allow regiserting multiple callbacks (closed #4) 2024-06-25 09:22:25 +08:00
ChillerDragon 141865538f Finish adding all 0.7 snap items that are actually sent 2024-06-24 22:50:15 +08:00
ChillerDragon 0edc8b334b Restore 100% go by outsourcing lintdown.sh 2024-06-24 18:02:31 +08:00
ChillerDragon 72b008f6d8 First draft of snap unpacking 2024-06-24 17:34:51 +08:00
ChillerDragon 8acb893165 Remove drunk dev comments xd 2024-06-24 16:15:09 +08:00
ChillerDragon fc4a3becde Add some more game message structs 2024-06-24 14:56:04 +08:00
ChillerDragon 098341aad5 go fmt readme snippets and shellcheck check script 2024-06-24 12:40:22 +08:00
ChillerDragon 0e55e09207 Compile readme examples in CI 2024-06-24 12:26:43 +08:00
ChillerDragon a0020d8eef The example from the readme now actually works 2024-06-24 11:48:28 +08:00
ChillerDragon 60f9e182a8 Always set num chunks to 0 in control packets
This is what the reference implementation expects.
Otherwise it tries to call FetchChunk and fails to parse the header.
2024-06-24 09:48:03 +08:00
Chiller Dragon 98c01516e5
Merge pull request #3 from jxsl13/chore/cleanup-error-handling
cleanup code, add test utilities, add error return values
2024-06-24 08:12:44 +08:00
John Behm bf7bca4b6a
add comment 2024-06-23 21:26:47 +02:00
John Behm 9538782751
fix incorrect want/got order 2024-06-23 21:21:39 +02:00
John Behm 4cb087920c
cleanup code, add test utilities, add error return values 2024-06-23 21:18:54 +02:00
ChillerDragon 4b9ae9a4b3 Unused imports in example 2024-06-23 17:08:59 +08:00
ChillerDragon 4a47664fd1 Massage readme 2024-06-23 17:03:42 +08:00
Chiller Dragon aa5b67aab7
Merge pull request #1 from teeworlds-go/pr_lil_refactor
lil refactor
2024-06-23 17:01:01 +08:00
ChillerDragon a6c11c71a8 lil refactor 2024-06-23 17:00:39 +08:00
ChillerDragon 0a88246a9a Finish 0.7 system messages 2024-06-23 12:19:27 +08:00
Chiller Dragon c1791fa3be
Add bsd 2 LICENSE 2024-06-23 07:50:17 +08:00
ChillerDragon 5e81eef4c7 Rebrand from teeworlds to go-teeworlds-protocol 2024-06-22 13:59:27 +08:00
ChillerDragon 1cb97f07b4 Detailed print of unknown messages 2024-06-22 13:35:13 +08:00
ChillerDragon 1cf0184d60 Add input timing and dont error on snap empty 2024-06-22 13:15:25 +08:00
ChillerDragon e1fc8a94f5 Add snap empty msg 2024-06-22 13:07:47 +08:00
ChillerDragon 9ea7a3735c These examples need a better place 2024-06-22 12:38:17 +08:00
ChillerDragon 72bf459d79 Refactor: separate packet parsing and connection state
Computing a response to a packet is now separate from unpacking a packet
2024-06-22 12:25:29 +08:00
ChillerDragon 915943ff16 Add Packet.Unpack() 2024-06-22 10:38:06 +08:00
ChillerDragon 94b6c7787c Keep unkown messages on repack 2024-06-21 13:14:01 +08:00
ChillerDragon 88a312abc4 Add ctrl close 2024-06-21 11:21:48 +08:00
ChillerDragon 4d05818f15 Compress packet payload if compression flag is set 2024-06-21 11:00:40 +08:00
ChillerDragon 4f37d5de48 Fix nil result and add ip port cli args 2024-06-21 10:40:49 +08:00
ChillerDragon ac347f1f39 Fix crash on server chat messages 2024-06-21 10:31:43 +08:00
ChillerDragon 759d37658b Fix logic error in sample 2024-06-21 10:07:58 +08:00
ChillerDragon db550ce86f Store chunk header when unpacking 2024-06-21 09:50:46 +08:00
ChillerDragon 7c4a3be31c Automatically compute chunk header size on pack 2024-06-21 09:38:59 +08:00
ChillerDragon 0f9cb77677 POC: inspect incoming traffic 2024-06-20 13:27:46 +08:00
ChillerDragon 81f6b89f70 Horrible refactor to allow unpacking net messages 2024-06-20 13:07:10 +08:00
ChillerDragon a78bf12bf0 Make OnPacket return a result struct 2024-06-20 12:29:26 +08:00
ChillerDragon 5627630145 Split CI jobs 2024-06-20 12:12:15 +08:00
ChillerDragon a112473d0f POC: the user has full control over outgoing traffic 2024-06-20 12:10:22 +08:00
ChillerDragon 79d6308a4a Remove network dependency from protocol parser
Following the sans io principle
https://sans-io.readthedocs.io/
2024-06-20 11:19:54 +08:00
ChillerDragon ec59c03379 lil refactor 2024-06-20 11:15:36 +08:00
ChillerDragon 7cf7cfdb8c Suffix everything 0.7 specific with 7 2024-06-20 08:26:04 +08:00
ChillerDragon 5fd1c39039 Add 7 suffix to messages 2024-06-19 13:00:05 +08:00
ChillerDragon 8f4004a2ce Move constants to network7 package 2024-06-19 12:57:32 +08:00