protected void readProxyResponse ( VirtualConnection inVC ) { int size = 1 ; if ( ! this . isProxyResponseValid ) { // we need at least 12 bytes for the first line size = 12 ; } if ( connLink . isAsyncConnect ( ) ) { VirtualConnection vcRC = connLink . getReadInterface ( ) . read ( size , this . proxyReadCB , false , TCPRequestContext . USE_CHANNEL_TIMEOUT ) ; if ( null != vcRC ) { this . proxyReadCB . complete ( vcRC , connLink . getReadInterface ( ) ) ; } } else { try { connLink . getReadInterface ( ) . read ( size , TCPRequestContext . USE_CHANNEL_TIMEOUT ) ; } catch ( IOException x ) { // no FFDC required if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "could not complete proxy handshake, read request failed" ) ; } releaseProxyReadBuffer ( ) ; connLink . connectFailed ( x ) ; } } }
Start a read for the response from the target proxy this is either the first read or possibly secondary ones if necessary .