Skip to content
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

No more "Ping timed out" servers in game lobby #457

Closed
raptor opened this issue Aug 22, 2015 · 6 comments
Closed

No more "Ping timed out" servers in game lobby #457

raptor opened this issue Aug 22, 2015 · 6 comments

Comments

@raptor
Copy link
Contributor

raptor commented Aug 22, 2015

From corteocarl on September 06, 2014 17:36:00

What new feature or enhancement would you like to request? To be able to get the server's name and description in the game lobby, even if it is ping timed out.

How? Well, we could connect to the server momentarily to get the info, like when you connect to play on the server, or we can get it from http://bitfighter.org/bitfighterStatus.json , since they have this info

Original issue: http://code.google.com/p/bitfighter/issues/detail?id=457

@raptor
Copy link
Contributor Author

raptor commented Aug 22, 2015

From corteocarl on September 06, 2014 16:37:30

Well, we could probably get it directly from the master server, without using http

@raptor
Copy link
Contributor Author

raptor commented Aug 22, 2015

From amginea4...@gmail.com on September 06, 2014 17:26:01

Can we also get players and bot count ?

@raptor
Copy link
Contributor Author

raptor commented Aug 22, 2015

From corteocarl on September 06, 2014 18:03:43

We can get player count in bitfgihterStatus.json, but I am pretty sure we can get everything via Master Server

@raptor
Copy link
Contributor Author

raptor commented Aug 22, 2015

From watusim...@bitfighter.org on December 23, 2014 21:17:48

I'll be honest and say I don't fully understand the ping timeout issue; I suspect it has to do with the server rejecting packets from unknown clients. When you join a server, the master server arranges the connection such that it appears to be coming from a known server, and I think the pings the clients send in the lobby do not use the arranged connection method. I suspect making them do so would fix the issue, but I'm not really sure.

Also, I'm not sure how to set up a local client for testing that can reproduce the problem. Any ideas on that front would be helpful in diagnosing and fixing this highly annoying problem.

Labels: 020

@raptor
Copy link
Contributor Author

raptor commented Aug 22, 2015

From buckyballreaction on December 24, 2014 07:57:45

The process on the UIQueryServers screen is like this:

  1. Client connects to master
  2. Master sends a list of server addresses
  3. Client asks each server for server info

The problem is that if a particular server is behind a firewall or NAT server, the client cannot form a direct connection to get the server info.

When you connect to a ping-timed out server, the client, server, and master do what's called 'UDP hole punching' to attempt to trick the NAT or firewall to allow packets from the specific client (this is an 'arranged connection'). It does not do this for the normal server info query because it is expensive (in time) to set up.

The easy way to test this is to set up a dedicated server on a server with all ports blocked.

A solution could be to get the server names from the master server instead of just the addresses to try connections. I would recommended leaving the '999' for ping, though, as that is a clear indicator that the server has its ports blocked.

@raptor
Copy link
Contributor Author

raptor commented Aug 22, 2015

From watusim...@bitfighter.org on December 25, 2014 12:53:20

I think it might be worthwhile to do an arranged connection for servers that are "ServerTimedOut" because it would be useful for potential clients to know if they will ultimately be able to connect or not. We could possibly try a direct connection first, then do an arranged connection if that fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants