code: private boolean validateServer(String host, int port){
          if(host==null || host.isEmpty()){
              return false;
          }
          if(port <=0 || port > 65535){
              return false;
          }
          return true;
      }
docs: Validate the host and port.
  
  @param host
  the host string.
  @param port
  the port number.
  @return
  true for success.