This commit is contained in:
2023-08-18 17:33:06 +08:00
parent 57337cbe16
commit 092daa022a
+6 -1
View File
@@ -19,9 +19,14 @@ class Client
* @param string $host
* @param int $port
* @param bool $isSsl
* @param bool $useCurl
*/
public function __construct(string $host, int $port, bool $isSsl = false)
public function __construct(string $host, int $port, bool $isSsl = false, bool $useCurl = false)
{
if ($useCurl) {
$this->abstracts = new CurlClient($host, $port, $isSsl);
return;
}
if (class_exists(Coroutine::class) && Coroutine::getCid() > -1) {
$this->abstracts = new CoroutineClient($host, $port, $isSsl);
} else {