Update doc

This commit is contained in:
Tatsuhiro Tsujikawa 2015-04-18 16:47:46 +09:00
parent a3fa257473
commit 85671a69bf
2 changed files with 6 additions and 0 deletions

View File

@ -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,

View File

@ -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;
}