curtis18 / yii2-swoft-rpc
swoft json tcp rpc client yii2
1.0
2019-07-26 04:32 UTC
Requires
- php: >=7.1.0
- yiisoft/yii2: *
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-05 07:06:27 UTC
README
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
- Documentation of Swoft
- Report Issues and Send Pull Requests in the Main Swoft JSON RCP Client (TCP) for Yii2 Repository
LICENSE
The Component is open-sourced software licensed under the Apache license.