M
M
Max Kot2020-03-24 19:33:33
Python
Max Kot, 2020-03-24 19:33:33

How to correctly collect packets for transmission over the network? What's the best way to encode?

How to collect packages correctly? What and how, I’m just learning myself, so here’s the question of assembling such a byte sausage, with some kind of ready-made module, or is it better to write your own completely flexible encoder? If there are ready-made options so as not to invent a bicycle, it would be nice, I used the struct module, but then I thought about how to decode this sausage on the server or client, before that I tried to write my own through varint and utf8, then I thought if there were no good options to write completely my own, but again, it’s interesting how to assemble packages correctly, ideally so that what element is also painted and why, as they advised me:
Package ID Package
Weight
Length
Str Str Str Str
Length
Str
etc.

The language of a snake, while I'm still learning and I want detailed answers what and how

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question