limingxinleo / jsonrpc-fpm-client
This package is abandoned and no longer maintained.
No replacement package was suggested.
v2.0.1
2020-07-17 01:35 UTC
Requires
- php: >=7.2
- hyperf/utils: 2.0.*
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.14
- mockery/mockery: ^1.0
- phpstan/phpstan: ^0.12
- phpunit/phpunit: ^7.0
- swoole/ide-helper: dev-master
This package is auto-updated.
Last update: 2020-08-27 06:59:57 UTC
README
声明
本组件已不再维护,请使用 JET
安装
composer require limingxinleo/jsonrpc-fpm-client
使用
实现 Client
<?php use Xin\JsonRPC\FpmClient\Client; /** * @method string id(string $id) * @method void exception() */ class IdGenerator extends Client { }
调用 RPC
<?php use Xin\JsonRPC\FpmClient\Packer\JsonLengthPacker; use Xin\JsonRPC\FpmClient\Transporter\TcpTransporter; $client = new IdGenerator('IdGenerateService', new TcpTransporter('127.0.0.1', 9502), new JsonLengthPacker()); $ret = $client->id($id = uniqid());