doc: fix code nits in common/README
1. Sync comments and code 2. Fix typos PR-URL: https://github.com/nodejs/node/pull/17971 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
parent
54e8f4835f
commit
ec6ef6bd9a
@ -593,7 +593,7 @@ frame.
|
||||
// padlen is an 8-bit integer giving the number of padding bytes to include
|
||||
// final is a boolean indicating whether the End-of-stream flag should be set,
|
||||
// defaults to false.
|
||||
const data = new http2.DataFrame(id, payload, padlen, final);
|
||||
const frame = new http2.DataFrame(id, payload, padlen, final);
|
||||
|
||||
socket.write(frame.data);
|
||||
```
|
||||
@ -611,8 +611,7 @@ The `http2.HeadersFrame` is a subclass of `http2.Frame` that serializes a
|
||||
// padlen is an 8-bit integer giving the number of padding bytes to include
|
||||
// final is a boolean indicating whether the End-of-stream flag should be set,
|
||||
// defaults to false.
|
||||
const data = new http2.HeadersFrame(id, http2.kFakeRequestHeaders,
|
||||
padlen, final);
|
||||
const frame = new http2.HeadersFrame(id, payload, padlen, final);
|
||||
|
||||
socket.write(frame.data);
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user