socket
socket ?-myaddr addr? ?-myport myport? ?-async? host port
socket -server command ?-myaddr addr? port
Opens a TCP connection and gives a channel, or with -server makes a server that calls the command with a channel, an address, and a port for each new connection. Port 0 asks the system for a free port. Each address goes through the network policy of the host: loopback only by default.
Facts
- Capability:
socket. A new interpreter does not have this command. See Limits and capabilities. - Compute cost: one compute unit for the call, and more for the commands that it runs.