# openListener(String) -- open a port for listening

## Synopsis

• Function: openListener
• Usage:
f = openListener s
• Inputs:
• s, , of the form "\$interface:port". Both parts are optional. If the port is omitted, the colon is optional.
• Outputs:
• f, a file, an open listener on the specified interface of the local host at the specified service port. If the port is omitted, it is taken to be port 2500. If the interface is omitted, the listener accepts connections on all interfaces.

## Description

Use openInOut f to accept an incoming connection on the listener, returning a new input output file that serves as the connection. The function isReady can be used to determine whether an incoming connection has arrived, without blocking.