Amp\Artax\Client::onSocketResolve PHP Method

onSocketResolve() private method

private onSocketResolve ( RequestCycle $cycle, $error, $socket )
$cycle RequestCycle
    private function onSocketResolve(RequestCycle $cycle, $error, $socket)
    {
        if ($error) {
            $this->fail($cycle, $error);
            return;
        }
        $cycle->socket = $socket;
        $cycle->socketProcuredAt = microtime(true);
        $cycle->futureResponse->update([Notify::SOCK_PROCURED, null]);
        if ($cycle->uri->getScheme() === 'https') {
            $this->enableCrypto($cycle);
        } else {
            $this->onCryptoCompletion($cycle);
        }
    }