变更
This commit is contained in:
@@ -4,6 +4,7 @@ namespace Kiri\Rpc;
|
|||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use Kiri\Context;
|
use Kiri\Context;
|
||||||
|
use Kiri\Core\Json;
|
||||||
use Swoole\Client;
|
use Swoole\Client;
|
||||||
use Swoole\Coroutine;
|
use Swoole\Coroutine;
|
||||||
|
|
||||||
@@ -37,7 +38,7 @@ trait TraitTransporter
|
|||||||
private function request(Client|Coroutine\Client $client, $content, bool $isClose): mixed
|
private function request(Client|Coroutine\Client $client, $content, bool $isClose): mixed
|
||||||
{
|
{
|
||||||
$client->send($content);
|
$client->send($content);
|
||||||
$read = $client->recv();
|
$read = Json::decode($client->recv());
|
||||||
if ($isClose) {
|
if ($isClose) {
|
||||||
$client->close();
|
$client->close();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user