Basic implementation of working server to server message. #14226
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add ability for server-to-server communication in connection with Add transfer_player function to request client move to new server #14129.
Send string from one to another server. It is on Lua to serialize/deserialize string and do something around it.
With this, a network of servers should be created. So some networks like one server for space and another server for each planet, can be created and players can be transferred between servers by Add transfer_player function to request client move to new server #14129 and their inventories and other states can be synced by server-to-server communication.
To do
This PR is a Work in Progress.
How to test
Compile Minetest with this branch.
Create two worlds with the game devtest.
To
server0
world directory save file network_server_0.txt asnetwork.conf
.To
server1
world directory save file network_server_1.txt asnetwork.conf
.Host server for game
server0
on port30000
.Host server for game
server1
on port30000
.Call command
/send_msg_to_server server0 HELLO_SERVER!
onserver1
orcommand
/send_msg_to_server server1 HELLO_SERVER!
onserver0
.The first message is lost at the moment, so send the same message again to see it.
Received message should be printed as a message for all players on the second server.
simplescreenrecorder-2024-01-07_14.31.45.mp4