I have a voxel game in which you can run on blocks (chunks), jump and set/delete blocks. I want to write an asynchronous TCP server for it and choose boost asio as the network library. I have two commands, async_write_some and async_read_some, through them I can transfer the data structure to the JSON format.
How to organize the exchange of messages (packets?) between the server and the client, so that several people can play on the server at the same time?
For example, if you start from the server: should the client send a message and then wait for a response or should it continuously send messages and will a queue of them be made on the server? The same question about the client->server. If the client needs some kind of information from the server, then in what form should this command be sent? In the form of the word "give information about the players on the server" or what?
p.s. Do I need to compress the data being sent?