改名
This commit is contained in:
@@ -5,6 +5,7 @@ namespace HttpServer\Client;
|
||||
|
||||
|
||||
use Snowflake\Abstracts\Component;
|
||||
use Snowflake\Snowflake;
|
||||
use Swoole\Coroutine;
|
||||
|
||||
|
||||
@@ -12,14 +13,14 @@ use Swoole\Coroutine;
|
||||
* Class ClientDriver
|
||||
* @package HttpServer\Client
|
||||
*/
|
||||
class ClientDriver extends Component
|
||||
class HttpClient extends Component
|
||||
{
|
||||
|
||||
/**
|
||||
* @param $name
|
||||
* @return IClient
|
||||
*/
|
||||
public function __call($name): IClient
|
||||
public static function NewRequest($name): IClient
|
||||
{
|
||||
if (Coroutine::getCid() > 0) {
|
||||
return Client::NewRequest();
|
||||
@@ -28,4 +29,13 @@ class ClientDriver extends Component
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return Http2
|
||||
*/
|
||||
public static function http2()
|
||||
{
|
||||
return Snowflake::app()->http2;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user