TcpConnection.connect

ConnectResult connect(ref EventLoop loop, scope const(char)[] host, ushort port, CancelToken cancel = CancelToken .invalid) @trusted nothrow

Start a non-blocking connection attempt.

Parameters

loopEvent loop to register with.
hostHost name or IP address to connect to.
portPort number to connect to.
cancelOptional cancellation token.

Returns

ConnectResult.OK on success, or an error variant.