Socket.prototype.pending - Node documentation
property Socket.prototype.pending

Usage in Deno

import { Socket } from "node:net";

This is true if the socket is not connected yet, either because .connect()has not yet been called or because it is still in the process of connecting (see socket.connecting).

Type

boolean