-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If I try to join first and then host, I get an error with Failed to listen on port #148
Comments
If I understand your question correctly, that's the intended behaviour. Before you click the host button, the game host is not listening for connections, thus noone can connect. Maybe the point of confusion is the buttons on the Noray UI? The Connect button only connects to the noray server, and registers its address, so noray can forward traffic there. Think of it like announcing your address to the post office before moving in to your new place. They can send you letters, but you won't be there to read them. Only once you moved can you read the letters. Moving in in this example is starting the host, i.e. listening for connections. Let me know if that clears it up, and/or if there's a specific point in the documentation that you feel didn't provide enough info on this! |
I think the problem is that if you try to join and then start a server, the port is blocked, that's all. Might be ok or not, since it's same computer. Even though it's a bit weird that that port is blocked. Eg. what happens:
What I see should happen
|
I see now! The issue was that when the host receives the handshake command from noray, it has no role yet. Roles are set when you press the host or the join button. Without a role, it assumes that you're joining a game, so it tries to connect. So it creates a UDP connection, binds the registered local port, and the connection fails, since both clients are trying to connect to eachother, with neither of them listening. Created PR with fix. |
The use case is that I connect to Noray with both game instances.
Then, with one of them I do client connect(join) to the other instance(the other instance isn't yet started as host).
Then, with other instance I start it as a host.
I get the following error:
Failed to connect to 172.105.69.73:51200 with status 1
After the client fails to connect, I can host normally. I wonder why though. Is that port in use while the client is connecting? I am trying with the ForestBrawl demo.
The text was updated successfully, but these errors were encountered: