Skip to main content
ClientHttp2Session.addListener - http2 - Node documentation
method ClientHttp2Session.addListener

Usage in Deno

import { type ClientHttp2Session } from "node:http2";
ClientHttp2Session.addListener(
event: "altsvc",
listener: (
alt: string,
origin: string,
stream: number,
) => void
,
): this

Parameters

event: "altsvc"
listener: (
alt: string,
origin: string,
stream: number,
) => void

Return Type

this
ClientHttp2Session.addListener(
event: "origin",
listener: (origins: string[]) => void,
): this

Parameters

event: "origin"
listener: (origins: string[]) => void

Return Type

this
ClientHttp2Session.addListener(
event: "connect",
listener: (
socket: net.Socket | tls.TLSSocket,
) => void
,
): this

Parameters

event: "connect"
listener: (
socket: net.Socket | tls.TLSSocket,
) => void

Return Type

this
ClientHttp2Session.addListener(
event: "stream",
listener: () => void,
): this

Parameters

event: "stream"
listener: () => void

Return Type

this
ClientHttp2Session.addListener(
event: string | symbol,
listener: (...args: any[]) => void,
): this

Parameters

event: string | symbol
listener: (...args: any[]) => void

Return Type

this