<?php

use React\HttpClient\ConnectionManager;
use React\Dns\Resolver\Resolver;
use React\EventLoop\LoopInterface;

class Factory
{
    public function __construct(LoopInterface $loop, Resolver $resolver)
    {
        $this->loop = $loop;
        $this->resolver = $resolver;
    }

    public function createClient($socksHost, $socksPort)
    {
//         $connector = new ConnectionManager($this->loop, $this->resolver);
        $connector = new ConnectionManagerFsockopen($this->loop);
        return new Client($this->loop, $connector, $this->resolver, $socksHost, $socksPort);
    }
}

<?php

use React\HttpClient\ConnectionManager;
use React\Dns\Resolver\Resolver;
use React\EventLoop\LoopInterface;

class Factory
{
    public function __construct(LoopInterface $loop, Resolver $resolver)
    {
        $this->loop = $loop;
        $this->resolver = $resolver;
    }

    public function createClient($socksHost, $socksPort)
    {
        $connector = new ConnectionManager($this->loop, $this->resolver);
//         $connector = new ConnectionManagerFsockopen($this->loop);
        return new Client($this->loop, $connector, $this->resolver, $socksHost, $socksPort);
    }
}

Use async connection manager from react/http-client
Use async connection manager from react/http-client