0 votes

I'm having trouble setting up an asynchronous TCP connection with a server I created; what I'm currently doing is:

  1. Creating a new StreamPeerTCP object on my script.
  2. Use streamtcp.connect_to_host(server_ip, server_port)

The server-side looks correct (a new tcp client shows up), but on Godot I can't seem to find any way to set signals for successful StreamPeer connections nor signals for receiving packets - I'm currently having to rely on _process to check when the connection state of the StreamPeerTCP ever changed, and the SceneTree signals networkd_peer_connected and connected_to_server doesn't seem to trigger ever. Is this a bug?

asked Jan 12 in Engine by henriquelalves (273 points)
edited Jan 15 by Calinou

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.