diff --git a/doc/api/http2.md b/doc/api/http2.md index c45e5142ca753c..aaf87bb11e3aab 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)`