Skip to main content
Module

std/node/net.ts>Socket#ref

Deno standard library
Go to Latest
method Socket.prototype.ref
import { Socket } from "https://deno.land/std@0.166.0/node/net.ts";

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

Returns

this

The socket itself.