- composer command
composer require curtis18/yii2-swoft-rpc- Please make sure Swoft RPC Server created before using this extension in Yii2.
use yii\Swoft\JsonRpc\Client;
public function actionRpcTest()
{
    $rpc = new Client("tcp://127.0.0.1:8001", \App\Rpc\Lib\TestInterface::class, "1.7");
    $result = $rpc->echoRpc("Hello World");
    echo $result;
}- Documentation of Swoft
- Report Issues and Send Pull Requests in the Main Swoft JSON RCP Client (TCP) for Yii2 Repository
The Component is open-sourced software licensed under the Apache license.