Replies: 1 comment 2 replies
-
First of all, a bunch of packets contain strings, not only the first one. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Incorrect behaviour
The problem is
Connect request [1]
- https://tshock.readme.io/docs/multiplayer-packet-structure#connect-request-1If client send payload string without leading byte length, then server will disconnect it with the LegacyMultiplayer reason.
Official terraria client behaviour
Official terraria client sends version with the leading byte length
Payload Example (Packet headers omitted)
0xB 0x54 0x65 0x72 0x72 0x61 0x72 0x69 0x61 0x32 0x34 0x38
(b'\x0bTerraria248') - valid0x54 0x65 0x72 0x72 0x61 0x72 0x69 0x61 0x32 0x34 0x38
(b'Terraria248') - invalid (LegacyMultiplayer.4)Suggestion
If String is encoded like:
length + utf8_bytes
please note that. Is documentation contains structs without details like missing/incorrect field/size/offset?Beta Was this translation helpful? Give feedback.
All reactions