Skip to main content
Server.prototype.getConnections - node__net.d.ts - Node documentation
method Server.prototype.getConnections

Usage in Deno

```typescript import { Server } from "node:node__net.d.ts"; ```
Server.prototype.getConnections(cb: (
error: Error | null,
count: number,
) => void
): void
Asynchronously get the number of concurrent connections on the server. Works when sockets were sent to forks. Callback should take two arguments `err` and `count`.

Parameters

cb: (
error: Error | null,
count: number,
) => void

Return Type

void