This commit is contained in:
2021-12-11 16:39:46 +08:00
parent 6434be4f52
commit 80a2db8974
3 changed files with 179 additions and 3 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ class Client
{
private CoroutineClient|Curl $abstracts;
private CoroutineClient|Curl|AsyncClient $abstracts;
/**
@@ -25,7 +25,7 @@ class Client
if (Context::inCoroutine()) {
$this->abstracts = new CoroutineClient($host, $port, $isSsl);
} else {
$this->abstracts = new Curl($host, $port, $isSsl);
$this->abstracts = new AsyncClient($host, $port, $isSsl);
}
}