Skip to main content
ServerHttp2Session.prependOnceListener - node__http2.d.ts - Node documentation
method ServerHttp2Session.prependOnceListener

Usage in Deno

```typescript import { type ServerHttp2Session } from "node:node__http2.d.ts"; ```
ServerHttp2Session.prependOnceListener(
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.prependOnceListener(
event: "stream",
listener: (
flags: number,
) => void
,
): this

Parameters

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

Return Type

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

Parameters

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

Return Type

this