question: private void createTunnel ( ) throws IOException , InterruptedException { while ( true ) { final SocketPolicy socketPolicy = dispatcher . peekSocketPolicy ( ) ; if ( ! processOneRequest ( raw , raw . getInputStream ( ) , raw . getOutputStream ( ) ) ) { throw new IllegalStateException ( "Tunnel without any CONNECT!" ) ; } if ( socketPolicy == SocketPolicy . UPGRADE_TO_SSL_AT_END ) { return ; } } }
target:  Respond to CONNECT requests until a SWITCH_TO_SSL_AT_END response is dispatched.