Commit 85671a69 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Update doc

parent a3fa2574
......@@ -51,6 +51,7 @@
/* Exported for unit test */
#define NGHTTP2_STATIC_TABLE_LENGTH 61
/* Generated by genlibtokenlookup.py */
typedef enum {
NGHTTP2_TOKEN__AUTHORITY = 0,
NGHTTP2_TOKEN__METHOD = 1,
......
......@@ -2244,12 +2244,17 @@ static int session_close_stream_on_goaway(nghttp2_session *session,
static void session_outbound_item_schedule(nghttp2_session *session,
nghttp2_outbound_item *item,
int32_t weight) {
/* Schedule next write. Offset proportional to the write size.
Stream with heavier weight is scheduled earlier. */
size_t delta = item->frame.hd.length * NGHTTP2_MAX_WEIGHT / weight;
if (session->last_cycle < item->cycle) {
session->last_cycle = item->cycle;
}
/* We pretend to ignore overflow given that the value range of
item->cycle, which is uint64_t. nghttp2 won't explode even when
overflow occurs, there might be some disturbance of priority. */
item->cycle = session->last_cycle + delta;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment