Network ports are a mild abstraction of TCP sockets. They are a subtype of ports.
This proposal depends on SettingsListsCowan. Settings lists passed to procedures in this proposal MUST NOT contain the path key, but MAY contain the keys host and port defined below.
The procedures in this section take a specification for a TCP socket and return a input/output port connected to the socket.
(open-network-client settings-list)
Returns an input/output port connected to the host and port specified by settings-list.
(make-network-listener settings-list)
Returns an opaque listener object (which may be of any type) that will accept connections to the port and host (which must be a local address) specified in settings-list. If the host is not specified, the listener will accept connections that are made to port on any local address.
(open-network-server listener)
Waits for a client to connect to listener, and returns an input/output port connected to that client. When the port is closed, this procedure may be invoked again on the same listener.
(close-network-listener listener)
Close listener and abandon any further attempts to listen for collections.
Implementations MUST support the following keys: