I have no idea if this could be possible but if you try to connect to a server which is offline you normally get the message: Failed to connect to server. Can this message be changed server-side? For example you have an application listening on the server port and sends a message back to the client if he tries to connect.