Skip to main content
performServerHandshake - node__http2.d.ts - Node documentation
function performServerHandshake

Usage in Deno

```typescript import { performServerHandshake } from "node:node__http2.d.ts"; ```
performServerHandshake<
Http1Request extends IncomingMessage = IncomingMessage,
Http1Response extends ServerResponse = ServerResponse,
Http2Request extends Http2ServerRequest = Http2ServerRequest,
Http2Response extends Http2ServerResponse = Http2ServerResponse,
>
(
socket: stream.Duplex,
options?: ServerOptions<Http1Request, Http1Response, Http2Request, Http2Response>,
): ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>
Create an HTTP/2 server session from an existing socket.

Type Parameters

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

Parameters

socket: stream.Duplex
A Duplex Stream
Any `[createServer](../.././node__http2.d.ts/~/createServer)` options can be provided.

Return Type