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

Usage in Deno

import { type ClientHttp2Session } from "node:http2";
ClientHttp2Session.prependListener(
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.prependListener(
event: "origin",
listener: (origins: string[]) => void,
): this

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

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

Parameters

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

Return Type

this
Back to top