vincentmi / php-rpc-client
A RPC client for tourscool
Installs: 60
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/vincentmi/php-rpc-client
Requires
- php: >=5.5.0
Requires (Dev)
- phpunit/phpunit: 5.7.*
This package is not auto-updated.
Last update: 2025-10-16 17:32:16 UTC
README
简介
PHP RPC 客户端,使用JSON对载荷进行编码和解码
使用方法
use Tourscool\RpcClient\Client; $client = new Client([ 'endpoints'=>[ 'tcp://192.168.1.251:20182' , 'tcp://192.168.1.252:2010' ] ]); try { $result = $client->service('Greeting')->sayHello('Vincent'); print_r($result); }catch(RpcException $e){ echo 'RPC fail'; }