Skip to main content
Http2Session.socket - http2 - Node documentation
property Http2Session.socket

Usage in Deno

import { type Http2Session } from "node:http2";

Returns a Proxy object that acts as a net.Socket (or tls.TLSSocket) but limits available methods to ones safe to use with HTTP/2.

destroy, emit, end, pause, read, resume, and write will throw an error with code ERR_HTTP2_NO_SOCKET_MANIPULATION. See Http2Session and Sockets for more information.

setTimeout method will be called on this Http2Session.

All other interactions will be routed directly to the socket.

Type

net.Socket | tls.TLSSocket