curtis18 / yii2-swoft-rpc
swoft json tcp rpc client yii2
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/curtis18/yii2-swoft-rpc
Requires
- php: >=7.1.0
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2025-10-05 05:04:33 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.