+1 vote

I'm working on a multiplayer game in which the clients will connect to a Python server. I'm after connecting to the server with

var connection = StreamPeerTCP.new()
var wrapped_client = PacketPeerStream.new()
connection.connect_to_host( ip, port )

And then sending data with


However, the python server receives


As you can see, there is a prefix that seems to be null data. The hex representation of the data received on the server is as follows,

0c 20 20 20 04 20 20 20 02 20 20 20 68 69

This shows that there is a lot of excess data up until the last two bytes, which represent the characters "h" and "i". What exactly is this data for? Is there any way to not send this excess information?

asked May 29, 2018 in Engine by AngelOnFira (27 points)

1 Answer

+1 vote



when you send a string down the network api, you are actually sending a variant.

according to the docs, the first 12 bytes are the header for the string.

answered Jul 19, 2018 by hungrymonkey (427 points)
edited Jul 19, 2018 by Calinou
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.