0 votes

I use the godot StreamPeerTCP for a low level communication for my board game. Somewhy I get random noise from the peer, without even running my server... for example:
random noise

Here's the code:

func _ready():
    load_board()

func load_board():
    socket = StreamPeerTCP.new()
    if socket.connect_to_host("127.0.0.1", 5635) == OK:
        wait_thread.start(self, "wait_for_start")
    else:
        pass #TODO

func wait_for_start(args):
    while true:
        level = socket.get_utf8_string(36)
        print(level)
        if len(level) == 36:
            break
Godot version 3.2.1
in Engine by (27 points)

Please log in or register to answer this question.

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.