# net/connect-tls Create an outbound TLS client connection (mbedTLS). ## Syntax
[net/connect-tls $host $port]
## Parameters - `$host` — hostname (used for SNI and certificate verification) - `$port` — port number ## Examples
set conn [net/connect-tls "irc.libera.chat" 6697]
[net/on-line $conn {|m| echo $m~line}]
## Returns `tcp_conn` resource. Once the TLS handshake completes, `net/send`, `net/on-line`, etc. transparently use the encrypted channel. ## See Also `net/connect`, `net/on-line`, `net/send`