Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 918 Bytes

README.md

File metadata and controls

37 lines (25 loc) · 918 Bytes

Swoft JSON RCP Client (TCP) for Yii2

Install

  • composer command
composer require curtis18/yii2-swoft-rpc

Usage

  • 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;
}

Resources

LICENSE

The Component is open-sourced software licensed under the Apache license.