Skip to main content
IncomingMessage.prototype.socket - http - Node documentation
property IncomingMessage.prototype.socket

Usage in Deno

import { IncomingMessage } from "node:http";

The net.Socket object associated with the connection.

With HTTPS support, use request.socket.getPeerCertificate() to obtain the client's authentication details.

This property is guaranteed to be an instance of the net.Socket class, a subclass of stream.Duplex, unless the user specified a socket type other than net.Socket or internally nulled.

Type