interface

net.BoundSocketOptions

interface BoundSocketOptions

  • host?: string

    Local address to bind. Must be a numeric IP literal; no DNS resolution is performed. Default: '0.0.0.0', or '::' when ipv6Only is true.

  • ipv6Only?: boolean

    Sets IPV6_V6ONLY, disabling dual-stack support so the socket binds IPv6 only. Only meaningful for IPv6 binds. Default: false.

  • port?: number

    Local port. 0 requests an OS-assigned ephemeral port. Default: 0.

  • reusePort?: boolean

    Sets SO_REUSEPORT, allowing multiple sockets to bind the same address and port for kernel-level load balancing. Support is platform-dependent. Default: false.