Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/cli/tsc/dts/lib.deno.unstable.d.ts>Deno.TcpListenOptions

A modern runtime for JavaScript and TypeScript.
Latest
interface Deno.TcpListenOptions
implements ListenOptions
import { type Deno } from "https://deno.land/x/deno@v2.0.4/cli/tsc/dts/lib.deno.unstable.d.ts";
const { TcpListenOptions } = Deno;

Properties

optional
reusePort: boolean = false

When true the SO_REUSEPORT flag will be set on the listener. This allows multiple processes to listen on the same address and port.

On Linux this will cause the kernel to distribute incoming connections across the different processes that are listening on the same address and port.

This flag is only supported on Linux. It is silently ignored on other platforms.