code: protected SSLEngineResult.HandshakeStatus doTasks() {
          Runnable runnable;
  
          // We could run this in a separate thread, but do in the current for
          // now.
          while ((runnable = sslEngine.getDelegatedTask()) != null) {
              runnable.run();
          }
          return sslEngine.getHandshakeStatus();
      }
docs: Do all the outstanding handshake tasks in the current Thread.
  
  @return The result of handshake