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

Usage in Deno

import { type Http2Stream } from "node:http2";
Http2Stream.addListener(
event: "aborted",
listener: () => void,
): this

Parameters

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

Return Type

this
Http2Stream.addListener(
event: "close",
listener: () => void,
): this

Parameters

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

Return Type

this
Http2Stream.addListener(
event: "data",
listener: (chunk: Buffer | string) => void,
): this

Parameters

event: "data"
listener: (chunk: Buffer | string) => void

Return Type

this
Http2Stream.addListener(
event: "drain",
listener: () => void,
): this

Parameters

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

Return Type

this
Http2Stream.addListener(
event: "end",
listener: () => void,
): this

Parameters

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

Return Type

this
Http2Stream.addListener(
event: "error",
listener: (err: Error) => void,
): this

Parameters

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

Return Type

this
Http2Stream.addListener(
event: "finish",
listener: () => void,
): this

Parameters

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

Return Type

this
Http2Stream.addListener(
event: "frameError",
listener: (
frameType: number,
errorCode: number,
) => void
,
): this

Parameters

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

Return Type

this
Http2Stream.addListener(
event: "pipe",
listener: (src: stream.Readable) => void,
): this

Parameters

event: "pipe"
listener: (src: stream.Readable) => void

Return Type

this
Http2Stream.addListener(
event: "unpipe",
listener: (src: stream.Readable) => void,
): this

Parameters

event: "unpipe"
listener: (src: stream.Readable) => void

Return Type

this
Http2Stream.addListener(
event: "streamClosed",
listener: (code: number) => void,
): this

Parameters

event: "streamClosed"
listener: (code: number) => void

Return Type

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

Parameters

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

Return Type

this
Http2Stream.addListener(
event: "trailers",
listener: (
flags: number,
) => void
,
): this

Parameters

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

Return Type

this
Http2Stream.addListener(
event: "wantTrailers",
listener: () => void,
): this

Parameters

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

Return Type

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

Parameters

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

Return Type

this