HH\Lib\TCP\connect_async
Connect to a socket asynchronously, returning a non-disposable handle
namespace HH\Lib\TCP;
function connect_async(
string $host,
int $port,
ConnectOptions $opts = dict [
],
): Awaitable<CloseableSocket>;
If using IPv6 with a fallback to IPv4 with a connection timeout, the timeout will apply separately to the IPv4 and IPv6 connection attempts.
Parameters
string $host
int $port
ConnectOptions $opts = dict [ ]