This commit is contained in:
2021-10-28 18:31:25 +08:00
parent c7f4b8a0f7
commit d52920418a
5 changed files with 15 additions and 49 deletions
+5 -2
View File
@@ -28,13 +28,16 @@ trait TraitTransporter
/**
* @param Client|Coroutine\Client $client
* @param $content
* @param bool $isClose
* @return mixed
*/
private function request(Client|Coroutine\Client $client, $content): mixed
private function request(Client|Coroutine\Client $client, $content, bool $isClose): mixed
{
$client->send($content);
$read = $client->recv();
$client->close();
if ($isClose) {
$client->close();
}
return $read;
}