Skip to content

doc: add params for ClientHttp2Session:altsvc

Add parameters for the callback for the ClientHttp2Session:altsvc event inline with the pattern in the rest of the documentation.

Refs: https://github.com/nodejs/help/issues/877#issuecomment-381253464

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines

/cc @mcollina @nodejs/http2 @vsemozhetbyt

P.S. I swapped out streamId for stream, because of the following code in lib/http2/core.js:

function onAltSvc(stream, origin, alt) {
  const session = this[kOwner];
  if (session.destroyed)
    return;
  debug(`Http2Session ${sessionName(session[kType])}: altsvc received: ` +
        `stream: ${stream}, origin: ${origin}, alt: ${alt}`);
  session[kUpdateTimer]();
  session.emit('altsvc', alt, origin, stream);
}

Let me know if it should be reverted.

Merge request reports

Loading