0 votes

I am running two independent games, each connecting to a headless Godot server successfully by creating ENet clients and doing the standard gettree().setnetwork_peer(client).

After two players have connected the server sends each the ip address and port of the other and I would like to have the two client sessions then cleanly close their connections to the server and connect to each other in a new server-client ENet connection. The clients are correctly getting each others' address and port, and one is correctly making a new server and setting gettree().setnetworkpeer(matchserver) while the other is correctly doing a gettree().setnetworkpeer(matchclient). I'm constructing and setting as I do in _ready() to connect to the remote match making server. However the new matched server-client ENet pair are not able to connect.

If I hard code the ip/port of each device, and bypass the match making server, they connect fine. It's only when I first connect to the match making server, receive the match's info, close the server connection that the peer to peer connection fails.

I can provide code after I clean it up a bit. I'm wondering what I might be missing here. Thanks in advance!

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