Skip to main content
Http2Server - node__http2.d.ts - Node documentation
interface Http2Server
extends [net.Server], HTTP2ServerCommon

Usage in Deno

```typescript import { type Http2Server } from "node:node__http2.d.ts"; ```

Type Parameters

Http1Request extends IncomingMessage = IncomingMessage
Http1Response extends ServerResponse = ServerResponse
Http2Request extends Http2ServerRequest = Http2ServerRequest
Http2Response extends Http2ServerResponse = Http2ServerResponse

Methods

addListener(
event: "checkContinue",
listener: (
request: InstanceType<Http2Request>,
response: InstanceType<Http2Response>,
) => void
,
): this
addListener(
event: "request",
listener: (
request: InstanceType<Http2Request>,
response: InstanceType<Http2Response>,
) => void
,
): this
addListener(
event: "session",
): this
addListener(
event: "sessionError",
listener: (err: Error) => void,
): this
addListener(
event: "stream",
listener: (
flags: number,
) => void
,
): this
addListener(
event: "timeout",
listener: () => void,
): this
addListener(
event: string | symbol,
listener: (...args: any[]) => void,
): this
emit(
event: "checkContinue",
request: InstanceType<Http2Request>,
response: InstanceType<Http2Response>,
): boolean
emit(
event: "request",
request: InstanceType<Http2Request>,
response: InstanceType<Http2Response>,
): boolean
emit(
event: "sessionError",
err: Error,
): boolean
emit(
event: "stream",
flags: number,
): boolean
emit(event: "timeout"): boolean
emit(
event: string | symbol,
...args: any[],
): boolean
on(
event: "checkContinue",
listener: (
request: InstanceType<Http2Request>,
response: InstanceType<Http2Response>,
) => void
,
): this
on(
event: "request",
listener: (
request: InstanceType<Http2Request>,
response: InstanceType<Http2Response>,
) => void
,
): this
on(
event: "session",
): this
on(
event: "sessionError",
listener: (err: Error) => void,
): this
on(
event: "stream",
listener: (
flags: number,
) => void
,
): this
on(
event: "timeout",
listener: () => void,
): this
on(
event: string | symbol,
listener: (...args: any[]) => void,
): this
once(
event: "checkContinue",
listener: (
request: InstanceType<Http2Request>,
response: InstanceType<Http2Response>,
) => void
,
): this
once(
event: "request",
listener: (
request: InstanceType<Http2Request>,
response: InstanceType<Http2Response>,
) => void
,
): this
once(
event: "session",
): this
once(
event: "sessionError",
listener: (err: Error) => void,
): this
once(
event: "stream",
listener: (
flags: number,
) => void
,
): this
once(
event: "timeout",
listener: () => void,
): this
once(
event: string | symbol,
listener: (...args: any[]) => void,
): this
prependListener(
event: "checkContinue",
listener: (
request: InstanceType<Http2Request>,
response: InstanceType<Http2Response>,
) => void
,
): this
prependListener(
event: "request",
listener: (
request: InstanceType<Http2Request>,
response: InstanceType<Http2Response>,
) => void
,
): this
prependListener(
event: "session",
): this
prependListener(
event: "sessionError",
listener: (err: Error) => void,
): this
prependListener(
event: "stream",
listener: (
flags: number,
) => void
,
): this
prependListener(
event: "timeout",
listener: () => void,
): this
prependListener(
event: string | symbol,
listener: (...args: any[]) => void,
): this
prependOnceListener(
event: "checkContinue",
listener: (
request: InstanceType<Http2Request>,
response: InstanceType<Http2Response>,
) => void
,
): this
prependOnceListener(
event: "request",
listener: (
request: InstanceType<Http2Request>,
response: InstanceType<Http2Response>,
) => void
,
): this
prependOnceListener(
event: "session",
): this
prependOnceListener(
event: "sessionError",
listener: (err: Error) => void,
): this
prependOnceListener(
event: "stream",
listener: (
flags: number,
) => void
,
): this
prependOnceListener(
event: "timeout",
listener: () => void,
): this
prependOnceListener(
event: string | symbol,
listener: (...args: any[]) => void,
): this