Beispiel #1
0
 /** Prepares the connection specs to attempt. */
 private void resetConnectionSpecs() {
   connectionSpecs = new ArrayList<>();
   List<ConnectionSpec> specs = address.getConnectionSpecs();
   for (int i = 0, size = specs.size(); i < size; i++) {
     ConnectionSpec spec = specs.get(i);
     if (request.isHttps() == spec.isTls()) {
       connectionSpecs.add(spec);
     }
   }
   nextSpecIndex = 0;
 }
Beispiel #2
0
 private boolean shouldSendTlsFallbackIndicator(ConnectionSpec connectionSpec) {
   return connectionSpec != connectionSpecs.get(0) && connectionSpec.isTls();
 }