I am developing an application which connects to the server. By now the login and data transmission works fine if theserver is available. The problem arises when the server is unavailable. In this case the method sends a login request and waits for the response.
Does anyone know how to check if the server is available (visible)?
The pseudocode of the simple logic that has to be implemented is the following:
- String serverAddress = (Read value from configuration file) //already done
- boolean serverAvailable = (Check if the server serverAddress is available)//has to be implemented
- (Here comes the logic which depends on serverAvailable)