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

Usage in Deno

import { type ServerHttp2Session } from "node:http2";
ServerHttp2Session.on(
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.on(
event: "stream",
listener: (
flags: number,
) => void
,
): this

Parameters

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

Return Type

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

Parameters

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

Return Type

this
Back to top