tcp = StreamPeerTCP.new()
var result = tcp.connect_to_host("192.168.0.111", 1234)
if tcp and tcp.is_connected_to_host():
if tcp.get_available_bytes() > 0:
var s = tcp.get_utf8_string(tcp.get_available_bytes())
$StatusLabel.text = str(s)
$StatusLabel.text = str("ping")
Made a simple tcp project, and run on MacOSX first. Server is python.
I noticed 4bytes little endian data which tells the size of sent data was attached in front of the utf-8 string what I typed in the LineEdit.
When I tried to run the same project on Windows10, the packet was came without size data attached on the same server.
Does it come from OS difference? Godot engine versions are same as 3.0.6.