# net/connect Create an outbound TCP client connection. ## Syntax
[net/connect $host $port]
## Parameters - `$host` — hostname or IP address (string); DNS is resolved - `$port` — port number ## Examples
set conn [net/connect "irc.libera.chat" 6667]
[net/on-line $conn {|m| echo $m~line}]
[net/send $conn "NICK deft-bot\r\n"]
## Returns `tcp_conn` resource. Use with `net/send`, `net/on-line`, `net/on-data`, `net/on-close`, `net/close-conn`. ## See Also `net/connect-tls`, `net/on-line`, `net/send`