Skip to main content
Socket.prototype.destroySoon - net - Node documentation
method Socket.prototype.destroySoon

Usage in Deno

import { Socket } from "node:net";
Socket.prototype.destroySoon(): void

Destroys the socket after all data is written. If the finish event was already emitted the socket is destroyed immediately. If the socket is still writable it implicitly calls socket.end().

Return Type

void