I want to query few game servers.
I have made a server refresher in Java which queries each server in a loop one by one.
Will changing to C++/C or PHP make querying faster or should i stick to Java ??
UDP Packets are sent / received to query a server.
Also, is there any faster way to do this other than one by one in loop.
Worst case time(when all servers offline ) is 200ms X number of servers . (2s is timeout for each). which becomes large when server list is huge.
You will not gain anything by switching language. Since network I/O is your main bottleneck you should consider doing the querying concurrently. Use threads or a threadpool to query multiple servers at once.