Mend
Bun

method

TLSSocket.end

data?: string | BufferSource,
byteOffset?: number,
byteLength?: number
): number;

Like Socket.write except it includes a TCP FIN packet

Use it to send your last message and close the connection.

end(): void;

Close the socket immediately

Referenced types

type BufferSource = NodeJS.TypedArray | DataView | ArrayBufferLike