setLocalWindowSize

abstract fun setLocalWindowSize(windowSize: Number)(source)

Sets the local endpoint's window size. The windowSize is the total window size to set, not the delta.

import http2 from 'node:http2';

const server = http2.createServer();
const expectedWindowSize = 2 ** 20;
server.on('connect', (session) => {

  // Set local window size to be 2 ** 20
  session.setLocalWindowSize(expectedWindowSize);
});

Since

v15.3.0, v14.18.0