jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/AsyncSSLDelegate.java
equal
deleted
inserted
replaced
194 * into it until handshaking completes. |
194 * into it until handshaking completes. |
195 * |
195 * |
196 * This same method is called to try and resume output after a blocking |
196 * This same method is called to try and resume output after a blocking |
197 * handshaking operation has completed. |
197 * handshaking operation has completed. |
198 */ |
198 */ |
199 private void upperWrite(ByteBufferReference[] refs, AsyncWriteQueue delayCallback) { |
199 private boolean upperWrite(ByteBufferReference[] refs, AsyncWriteQueue delayCallback) { |
200 // currently delayCallback is not used. Use it when it's needed to execute handshake in another thread. |
200 // currently delayCallback is not used. Use it when it's needed to execute handshake in another thread. |
201 try { |
201 try { |
202 ByteBuffer[] buffers = ByteBufferReference.toBuffers(refs); |
202 ByteBuffer[] buffers = ByteBufferReference.toBuffers(refs); |
203 int bytes = Utils.remaining(buffers); |
203 int bytes = Utils.remaining(buffers); |
204 while (bytes > 0) { |
204 while (bytes > 0) { |
228 ByteBufferReference.clear(refs); |
228 ByteBufferReference.clear(refs); |
229 } catch (Throwable t) { |
229 } catch (Throwable t) { |
230 closeExceptionally(t); |
230 closeExceptionally(t); |
231 errorHandler.accept(t); |
231 errorHandler.accept(t); |
232 } |
232 } |
|
233 // We always return true: either all the data was sent, or |
|
234 // an exception happened and we have closed the queue. |
|
235 return true; |
233 } |
236 } |
234 |
237 |
235 // Connecting at this level means the initial handshake has completed. |
238 // Connecting at this level means the initial handshake has completed. |
236 // This means that the initial SSL parameters are available including |
239 // This means that the initial SSL parameters are available including |
237 // ALPN result. |
240 // ALPN result. |