private boolean validateServer ( String host , int port ) { if ( host == null || host . isEmpty ( ) ) { return false ; } if ( port <= 0 || port > 65535 ) { return false ; } return true ; }
Validate the host and port .