net/connect
core-api
cfunction
src/core/net.c on line 508, column 1
(net/connect host port &opt cntype bindhost bindport)
Open a connection to communicate with a server at `host` `port`.
Returns a duplex stream that can be used to communicate with the
server. `cntype` is an optional keyword to specify a connection
type, either `:stream` or `:datagram`; the default is `:stream`.
`bindhost` and `bindport` are optional strings to select from what
address to make the outgoing connection; the default is the same as
using the OS's preferred address.