This commit is contained in:
2021-10-28 15:14:21 +08:00
parent 791af89ba9
commit 7e91e227b2
4 changed files with 47 additions and 30 deletions
+2 -2
View File
@@ -39,7 +39,7 @@ abstract class JsonRpcConsumers implements OnRpcConsumerInterface
} else {
$client = $this->clientNotCoroutine($config);
}
$client->send(json_encode(['jsonrpc' => $version, 'method' => $method, 'params' => $data]));
$client->send(json_encode(['jsonrpc' => $version, 'service' => $service, 'method' => $method, 'params' => $data]));
$client->close();
}
@@ -61,7 +61,7 @@ abstract class JsonRpcConsumers implements OnRpcConsumerInterface
} else {
$client = $this->clientNotCoroutine($config);
}
$client->send(json_encode(['jsonrpc' => $version, 'method' => $method, 'params' => $data, 'id' => $id]));
$client->send(json_encode(['jsonrpc' => $version, 'service' => $service, 'method' => $method, 'params' => $data, 'id' => $id]));
$read = $client->recv();
$client->close();
return json_decode($read, true);