![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | AngelOnFira |
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 )
wrapped_client.set_stream_peer(connection)
And then sending data with
wrapped_client.put_var("hi")
However, the python server receives
hi
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?