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

Usage in Deno

import { type Http2Server } from "node:http2";
Http2Server.addListener(
event: "checkContinue",
listener: (
request: InstanceType<Http2Request>,
response: InstanceType<Http2Response>,
) => void
,
): this

Parameters

event: "checkContinue"
listener: (
request: InstanceType<Http2Request>,
response: InstanceType<Http2Response>,
) => void

Return Type

this
Http2Server.addListener(
event: "request",
listener: (
request: InstanceType<Http2Request>,
response: InstanceType<Http2Response>,
) => void
,
): this

Parameters

event: "request"
listener: (
request: InstanceType<Http2Request>,
response: InstanceType<Http2Response>,
) => void

Return Type

this
Http2Server.addListener(
event: "session",
listener: (session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>) => void,
): this

Parameters

event: "session"
listener: (session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>) => void

Return Type

this
Http2Server.addListener(
event: "sessionError",
listener: (err: Error) => void,
): this

Parameters

event: "sessionError"
listener: (err: Error) => void

Return Type

this
Http2Server.addListener(
event: "stream",
listener: (
flags: number,
) => void
,
): this

Parameters

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

Return Type

this
Http2Server.addListener(
event: "timeout",
listener: () => void,
): this

Parameters

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

Return Type

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

Parameters

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

Return Type

this