diff --git a/doc/api/http2.md b/doc/api/http2.md index fea6c9a39ac..2ec398393f6 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -611,13 +611,15 @@ const http2 = require('node:http2'); const server = http2.createServer(); const expectedWindowSize = 2 ** 20; -server.on('connect', (session) => { +server.on('session', (session) => { // Set local window size to be 2 ** 20 session.setLocalWindowSize(expectedWindowSize); }); ``` +For http2 clients the proper event is either `'connect'` or `'remoteSettings'`. + #### `http2session.setTimeout(msecs, callback)`