Skip to main content
IncomingMessage.prototype.socket - node__http.d.ts - Node documentation
property IncomingMessage.prototype.socket

Usage in Deno

```typescript import { IncomingMessage } from "node:node__http.d.ts"; ```
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