nx.js
NamespacesSwitchInterfaces

ListenOptions

Specifies the port number and optional IP address for creating a TCP server.

See

Switch.listen()

Properties

PropertyTypeDescription
accept?(e: SocketEvent) => voidFunction to invoke when a new TCP socket has connected. This is a shorthand for: server.addEventListener('accept', fn);
ip?stringThe IP address of the network interface to bind to. If not defined, defaults to 0.0.0.0 to allow connections on any network device. Example "127.0.0.1"
portnumberThe port number to accept TCP connection from. Example 80

On this page