Forget about UDP packets
Posted: 03 May 2005 18:15
In multi openttd checks a server with an udp packet and then connects to it with a tcp connection. The problem is if we want to tunnel the connection trought an ssh forwarding (and bypass my school firewall
we can't cause ssh doesn't forward udp packets. What about a direct connection button who doesn't check the availability of the server ?
I've made a small hack in the source code just to remove the check of the availability of the server (by disabling the first if in NetworkGameWindowWndProc function in network_gui.c) so that the "join game" button is always enabled. Now I can connect to the server I want without relying on udp packet. The problem is that the game crashs when the server doesn't exist cause I guess there is no timeout on the tcp connection. So a button who directly connects to a server (in case of a ssh forwarding localhost) with a timeout will be perfect. This lead to an another question : Can we implement a timeout in the connect function ?

I've made a small hack in the source code just to remove the check of the availability of the server (by disabling the first if in NetworkGameWindowWndProc function in network_gui.c) so that the "join game" button is always enabled. Now I can connect to the server I want without relying on udp packet. The problem is that the game crashs when the server doesn't exist cause I guess there is no timeout on the tcp connection. So a button who directly connects to a server (in case of a ssh forwarding localhost) with a timeout will be perfect. This lead to an another question : Can we implement a timeout in the connect function ?