Skip to main content
Server.prototype.ref - net - Node documentation
method Server.prototype.ref

Usage in Deno

import { Server } from "node:net";
Server.prototype.ref(): this

Opposite of unref(), calling ref() on a previously unrefed server will not let the program exit if it's the only server left (the default behavior). If the server is refed calling ref() again will have no effect.

Return Type

this