Skip to main content
Http2Session.on - node__http2.d.ts - Node documentation
method Http2Session.on

Usage in Deno

```typescript import { type Http2Session } from "node:node__http2.d.ts"; ```
Http2Session.on(
event: "close",
listener: () => void,
): this

Parameters

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

Return Type

this
Http2Session.on(
event: "error",
listener: (err: Error) => void,
): this

Parameters

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

Return Type

this
Http2Session.on(
event: "frameError",
listener: (
frameType: number,
errorCode: number,
streamID: number,
) => void
,
): this

Parameters

event: "frameError"
listener: (
frameType: number,
errorCode: number,
streamID: number,
) => void

Return Type

this
Http2Session.on(
event: "goaway",
listener: (
errorCode: number,
lastStreamID: number,
opaqueData?: Buffer,
) => void
,
): this

Parameters

event: "goaway"
listener: (
errorCode: number,
lastStreamID: number,
opaqueData?: Buffer,
) => void

Return Type

this
Http2Session.on(
event: "localSettings",
listener: (settings: Settings) => void,
): this

Parameters

event: "localSettings"
listener: (settings: Settings) => void

Return Type

this
Http2Session.on(
event: "ping",
listener: () => void,
): this

Parameters

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

Return Type

this
Http2Session.on(
event: "remoteSettings",
listener: (settings: Settings) => void,
): this

Parameters

event: "remoteSettings"
listener: (settings: Settings) => void

Return Type

this
Http2Session.on(
event: "timeout",
listener: () => void,
): this

Parameters

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

Return Type

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

Parameters

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

Return Type

this