Mtimeout
Bun

method

TLSSocket.timeout

seconds: number
): void;

Set a timeout until the socket automatically closes.

To reset the timeout, call this function again.

When a timeout happens, the timeout callback is called and the socket is closed.