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

Usage in Deno

import { type ServerHttp2Session } from "node:http2";
ServerHttp2Session.prependListener(
event: "connect",
listener: (
session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>,
socket: net.Socket | tls.TLSSocket,
) => void
,
): this

Parameters

event: "connect"
listener: (
session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>,
socket: net.Socket | tls.TLSSocket,
) => void

Return Type

this
ServerHttp2Session.prependListener(
event: "stream",
listener: (
flags: number,
) => void
,
): this

Parameters

event: "stream"
listener: (
flags: number,
) => void

Return Type

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

Parameters

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

Return Type

this