+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?

in Engine by (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.

by (429 points)
edited by
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.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.