PHPackages                             im050/rpc-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. im050/rpc-client

ActiveLibrary[API Development](/categories/api)

im050/rpc-client
================

a rpc client for swoft rpc server

v0.1.1(7y ago)039Apache-2.0PHPPHP &gt;=7.0.0

Since Nov 13Pushed 7y ago1 watchersCompare

[ Source](https://github.com/im050/rpc-client)[ Packagist](https://packagist.org/packages/im050/rpc-client)[ Docs](https://github.com/im050/rpc-client)[ RSS](/packages/im050-rpc-client/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Rpc Client For Swoft
--------------------

[](#rpc-client-for-swoft)

一个用于传统php-fpm应用下调用swoft rpc-server的rpc客户端

### Examples

[](#examples)

```
$host = "tcp://127.0.0.1:8099";

//实例化一个service工厂
$factory = \Im050\RpcClient\ClientBuilder::instance();
$factory->setHost($host);

//获取demoService实例
$demoService = $factory->get("App\\Lib\\DemoInterface");

//调用demoService的getUser方法
$results = $demoService->getUsers([1,2,3,4,5,6]);

//调用demoService的getUserByCond方法
$results2 = $demoService->getUserByCond(1, 1, "lin", 1.2);

//改变demoService版本号
$demoService->setVersion('1.0.1');

//调用demoService的getUsers方法
$results3 = $demoService->getUsers([1,2]);

var_dump($results, $results2, $results3);
```

```
class DemoServices extends \Im050\RpcClient\Services\Services
{
    /**
     * 定义接口
     *
     * @var string
     */
    public $interface = "App\\Lib\\DemoInterface";

    /**
     * 定义版本号
     *
     * @var string
     */
    public $version = '1.0.1';
}

//通过类的方式创建demoService实例
$demoServiceV2 = $factory->get(DemoServices::class);

//获取demoServiceV2的用户
$results4 = $demoServiceV2->getUser(1);
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2740d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6db67fae4c8b132e47e7d2110f06f102bf060f7adee9a3db908d615ef8098480?d=identicon)[im050](/maintainers/im050)

---

Tags

rpc-clientswoft-rpc-serverswooleclientrpcswooleswoftsowft-rpc

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/im050-rpc-client/health.svg)

```
[![Health](https://phpackages.com/badges/im050-rpc-client/health.svg)](https://phpackages.com/packages/im050-rpc-client)
```

###  Alternatives

[swoft/swoft

Modern High performance AOP and Coroutine PHP Framework

5.5k34.5k](/packages/swoft-swoft)[hyperf/jet

Jet is a unification model RPC Client, built-in JSON RPC protocol, available to running in ALL PHP environments, including PHP-FPM and Swoole/Hyperf environments.

6119.1k](/packages/hyperf-jet)[swoft/http-client

HTTP Client Component for Swoft

1139.3k4](/packages/swoft-http-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
