TcpConnection.connect

ConnectStatus 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

ConnectStatus — success, or a ConnectError payload with the

reason and the captured OS error code.