mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
h2: explicit credit on connect
This commit is contained in:
parent
5c00887054
commit
34255ff54e
1 changed files with 16 additions and 3 deletions
|
@ -826,9 +826,6 @@ lws_h2_parse_frame_header(struct lws *wsi)
|
|||
pps->u.update_window.credit = (2 * h2n->length) + 65536;
|
||||
h2n->swsi->h2.peer_tx_cr_est += pps->u.update_window.credit;
|
||||
lws_pps_schedule(wsi, pps);
|
||||
pps = lws_h2_new_pps(LWS_H2_PPS_UPDATE_WINDOW);
|
||||
if (!pps)
|
||||
return 1;
|
||||
}
|
||||
if (wsi->h2.peer_tx_cr_est < (int)(2 * h2n->length) + 65536) {
|
||||
pps = lws_h2_new_pps(LWS_H2_PPS_UPDATE_WINDOW);
|
||||
|
@ -978,6 +975,22 @@ lws_h2_parse_frame_header(struct lws *wsi)
|
|||
|
||||
return 1;
|
||||
}
|
||||
|
||||
pps = lws_h2_new_pps(LWS_H2_PPS_UPDATE_WINDOW);
|
||||
if (!pps)
|
||||
return 1;
|
||||
pps->u.update_window.sid = h2n->sid;
|
||||
pps->u.update_window.credit = 4 * 65536;
|
||||
h2n->swsi->h2.peer_tx_cr_est += pps->u.update_window.credit;
|
||||
lws_pps_schedule(wsi, pps);
|
||||
|
||||
pps = lws_h2_new_pps(LWS_H2_PPS_UPDATE_WINDOW);
|
||||
if (!pps)
|
||||
return 1;
|
||||
pps->u.update_window.sid = 0;
|
||||
pps->u.update_window.credit = 4 * 65536;
|
||||
wsi->h2.peer_tx_cr_est += pps->u.update_window.credit;
|
||||
lws_pps_schedule(wsi, pps);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue