connect! : Str, U16 => Try(
Stream,
[
AddrInUse,
AddrNotAvailable,
ConnectionRefused,
Interrupted,
PermissionDenied,
TimedOut,
Unrecognized(
Str,
),
Unsupported,
],
)
Opens a TCP connection to a remote host.
# Connect to localhost:8080
stream = Tcp.connect!("localhost", 8080)?
Valid hostnames look like 127.0.0.1, ::1, localhost, or roc-lang.org.