mpyw\Co\Internal\Pool::addCurl PHP Method

addCurl() public method

Call curl_multi_add_handle() or push into queue.
public addCurl ( resource $ch ) : React\Promise\PromiseInterface
$ch resource
return React\Promise\PromiseInterface
    public function addCurl($ch)
    {
        return $this->scheduler->add($ch);
    }

Usage Example

Example #1
0
File: PoolTest.php Project: mpyw/co
 public function testCurlWithoutDeferred()
 {
     $pool = new Pool(new CoOption());
     $pool->addCurl(new DummyCurl('valid', 1));
     $pool->addCurl(new DummyCurl('invalid', 1, true));
     $pool->wait();
     $this->assertTrue(true);
 }
All Usage Examples Of mpyw\Co\Internal\Pool::addCurl