Skip to content

Commit

Permalink
http2: refactor outgoing write mechanism
Browse files Browse the repository at this point in the history
- Only finish outgoing `WriteWrap`s once data has actually been
  passed to the underlying socket.
  - This makes HTTP2 streams respect backpressure
- Use `DoTryWrite` as a shortcut for sending out as much of
  the data synchronously without blocking as possible
- Use `NGHTTP2_DATA_FLAG_NO_COPY` to avoid copying DATA frame
  contents into nghttp2’s buffers before sending them out.

Backport-PR-URL: #18050
PR-URL: #17718
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
addaleax authored and MylesBorins committed Jan 10, 2018
1 parent 9592691 commit bfc7e01
Show file tree
Hide file tree
Showing 2 changed files with 231 additions and 115 deletions.
Loading

0 comments on commit bfc7e01

Please sign in to comment.