/** * Acknowledge that certain amount of data has been read. * Depending on the total amount of un-acknowledge data the HTTP2 connection * can decide to send a window_update message to the peer. * * @param sz size, in bytes, of the data being acknowledged */ void ackConsumedData(final int sz) { ackConsumedData(null, sz); }
/** * Acknowledge that certain amount of data has been read. * Depending on the total amount of un-acknowledge data the HTTP2 connection * can decide to send a window_update message to the peer. * * @param sz size, in bytes, of the data being acknowledged */ void ackConsumedData(final int sz) { ackConsumedData(null, sz); }
/** * Acknowledge that certain amount of data has been read. * Depending on the total amount of un-acknowledge data the HTTP2 connection * can decide to send a window_update message to the peer. * * @param sz size, in bytes, of the data being acknowledged */ void ackConsumedData(final int sz) { ackConsumedData(null, sz); }
/** * Acknowledge that certain amount of data has been read. * Depending on the total amount of un-acknowledge data the HTTP2 connection * can decide to send a window_update message to the peer. * * @param sz size, in bytes, of the data being acknowledged */ void ackConsumedData(final int sz) { ackConsumedData(null, sz); }
/** * Acknowledge that certain amount of data has been read. * Depending on the total amount of un-acknowledge data the HTTP2 connection * can decide to send a window_update message to the peer. * * @param sz size, in bytes, of the data being acknowledged */ void ackConsumedData(final int sz) { ackConsumedData(null, sz); }
/** * Acknowledge that certain amount of data has been read. * Depending on the total amount of un-acknowledge data the HTTP2 connection * can decide to send a window_update message to the peer. * * @param sz size, in bytes, of the data being acknowledged */ void ackConsumedData(final int sz) { ackConsumedData(null, sz); }
/** * Acknowledge that certain amount of data has been read. * Depending on the total amount of un-acknowledge data the HTTP2 connection * can decide to send a window_update message to the peer. * * @param sz size, in bytes, of the data being acknowledged */ void ackConsumedData(final int sz) { ackConsumedData(null, sz); }
/** * Acknowledge that certain amount of data has been read. * Depending on the total amount of un-acknowledge data the HTTP2 connection * can decide to send a window_update message to the peer. * * @param sz size, in bytes, of the data being acknowledged */ void ackConsumedData(final int sz) { ackConsumedData(null, sz); }
/** * Acknowledge that certain amount of data has been read. * Depending on the total amount of un-acknowledge data the HTTP2 connection * can decide to send a window_update message to the peer. * * @param sz size, in bytes, of the data being acknowledged */ void ackConsumedData(final int sz) { ackConsumedData(null, sz); }
void sendPreface() { if (!isPrefaceSent) { synchronized (sessionLock) { if (!isPrefaceSent) { if (isServer) { sendServerPreface(); } else { sendClientPreface(); } isPrefaceSent = true; if (!isServer) { // If it's HTTP2 client, which uses HTTP/1.1 upgrade mechanism - // it can have unacked user data sent from the server. // So it's right time to ack this data and let the server send // more data if needed. ackConsumedData(getStream(0), 0); } } } } }
void sendPreface() { if (!isPrefaceSent) { synchronized (sessionLock) { if (!isPrefaceSent) { if (isServer) { sendServerPreface(); } else { sendClientPreface(); } isPrefaceSent = true; if (!isServer) { // If it's HTTP2 client, which uses HTTP/1.1 upgrade mechanism - // it can have unacked user data sent from the server. // So it's right time to ack this data and let the server send // more data if needed. ackConsumedData(getStream(0), 0); } } } } }
void sendPreface() { if (!isPrefaceSent) { synchronized (sessionLock) { if (!isPrefaceSent) { if (isServer) { sendServerPreface(); } else { sendClientPreface(); } isPrefaceSent = true; if (!isServer) { // If it's HTTP2 client, which uses HTTP/1.1 upgrade mechanism - // it can have unacked user data sent from the server. // So it's right time to ack this data and let the server send // more data if needed. ackConsumedData(getStream(0), 0); } } } } }
void sendPreface() { if (!isPrefaceSent) { synchronized (sessionLock) { if (!isPrefaceSent) { if (isServer) { sendServerPreface(); } else { sendClientPreface(); } isPrefaceSent = true; if (!isServer) { // If it's HTTP2 client, which uses HTTP/1.1 upgrade mechanism - // it can have unacked user data sent from the server. // So it's right time to ack this data and let the server send // more data if needed. ackConsumedData(getStream(0), 0); } } } } }
void sendPreface() { if (!isPrefaceSent) { synchronized (sessionLock) { if (!isPrefaceSent) { if (isServer) { sendServerPreface(); } else { sendClientPreface(); } isPrefaceSent = true; if (!isServer) { // If it's HTTP2 client, which uses HTTP/1.1 upgrade mechanism - // it can have unacked user data sent from the server. // So it's right time to ack this data and let the server send // more data if needed. ackConsumedData(getStream(0), 0); } } } } }
void sendPreface() { if (!isPrefaceSent) { synchronized (sessionLock) { if (!isPrefaceSent) { if (isServer) { sendServerPreface(); } else { sendClientPreface(); } isPrefaceSent = true; if (!isServer) { // If it's HTTP2 client, which uses HTTP/1.1 upgrade mechanism - // it can have unacked user data sent from the server. // So it's right time to ack this data and let the server send // more data if needed. ackConsumedData(getStream(0), 0); } } } } }
void sendPreface() { if (!isPrefaceSent) { synchronized (sessionLock) { if (!isPrefaceSent) { if (isServer) { sendServerPreface(); } else { sendClientPreface(); } isPrefaceSent = true; if (!isServer) { // If it's HTTP2 client, which uses HTTP/1.1 upgrade mechanism - // it can have unacked user data sent from the server. // So it's right time to ack this data and let the server send // more data if needed. ackConsumedData(getStream(0), 0); } } } } }
void flushInputData() { final Buffer cachedInputBufferLocal = cachedInputBuffer; final boolean cachedIsLastLocal = cachedIsLast; cachedInputBuffer = null; cachedIsLast = false; if (LOGGER.isLoggable(Level.FINEST)) { LOGGER.log(Level.FINEST, "{0} streamId={1}: flushInputData cachedInputBufferLocal={2}", new Object[]{Thread.currentThread().getName(), getId(), cachedInputBufferLocal != null ? cachedInputBufferLocal.toString() : null}); } if (cachedInputBufferLocal != null) { if (cachedInputBufferLocal.isComposite()) { ((CompositeBuffer) cachedInputBufferLocal).allowInternalBuffersDispose(true); cachedInputBufferLocal.allowBufferDispose(true); ((CompositeBuffer) cachedInputBufferLocal).disposeOrder(DisposeOrder.LAST_TO_FIRST); } final int size = cachedInputBufferLocal.remaining(); if (!inputBuffer.offer(cachedInputBufferLocal, cachedIsLastLocal)) { // if we can't add this buffer to the stream input buffer - // we have to release the part of connection window allocated // for the buffer http2Session.ackConsumedData(size); } } }
void flushInputData() { final Buffer cachedInputBufferLocal = cachedInputBuffer; final boolean cachedIsLastLocal = cachedIsLast; cachedInputBuffer = null; cachedIsLast = false; if (LOGGER.isLoggable(Level.FINEST)) { LOGGER.log(Level.FINEST, "{0} streamId={1}: flushInputData cachedInputBufferLocal={2}", new Object[]{Thread.currentThread().getName(), getId(), cachedInputBufferLocal != null ? cachedInputBufferLocal.toString() : null}); } if (cachedInputBufferLocal != null) { if (cachedInputBufferLocal.isComposite()) { ((CompositeBuffer) cachedInputBufferLocal).allowInternalBuffersDispose(true); cachedInputBufferLocal.allowBufferDispose(true); ((CompositeBuffer) cachedInputBufferLocal).disposeOrder(DisposeOrder.LAST_TO_FIRST); } final int size = cachedInputBufferLocal.remaining(); if (!inputBuffer.offer(cachedInputBufferLocal, cachedIsLastLocal)) { // if we can't add this buffer to the stream input buffer - // we have to release the part of connection window allocated // for the buffer http2Session.ackConsumedData(size); } } }
void sendPreface() { if (!isPrefaceSent) { synchronized (sessionLock) { if (!isPrefaceSent) { if (isServer) { sendServerPreface(); } else { sendClientPreface(); } isPrefaceSent = true; if (!isServer) { // If it's HTTP2 client, which uses HTTP/1.1 upgrade mechanism - // it can have unacked user data sent from the server. // So it's right time to ack this data and let the server send // more data if needed. ackConsumedData(getStream(0), 0); } } } } }
void sendPreface() { if (!isPrefaceSent) { synchronized (sessionLock) { if (!isPrefaceSent) { if (isServer) { sendServerPreface(); } else { sendClientPreface(); } isPrefaceSent = true; if (!isServer) { // If it's HTTP2 client, which uses HTTP/1.1 upgrade mechanism - // it can have unacked user data sent from the server. // So it's right time to ack this data and let the server send // more data if needed. ackConsumedData(getStream(0), 0); } } } } }