nx.socket
nx.socket.connect(spec)
nx.socket.connect { host, port, on_connect, on_data, on_close } -> handle. Opens a
TCP client connection and returns a handle with :write(data) and :close(). The
callbacks fire on the editor thread: on_connect() once connected, on_data(chunk)
per raw inbound batch, on_close(err) exactly once (err set on a connect/I-O
failure).
Defined in process.lua.