PHPackages                             pkg6/easy-rpc - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. pkg6/easy-rpc

ActiveLibrary[HTTP &amp; Networking](/categories/http)

pkg6/easy-rpc
=============

Detailed method of actual RPC method

v0.1.0(1y ago)020MITPHPPHP &gt;=7.4

Since Dec 11Pushed 1y agoCompare

[ Source](https://github.com/pkg6/easy-rpc)[ Packagist](https://packagist.org/packages/pkg6/easy-rpc)[ RSS](/packages/pkg6-easy-rpc/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

Installation
------------

[](#installation)

```
composer require pkg6/easy-rpc

```

initialization
--------------

[](#initialization)

### Server

[](#server)

```
$s = new Server();
$s->addCallback('add', function ($a, $b) {
    return $a + $b;
});
$s->start();

```

### Client

[](#client)

```
$client = new Client();
$client->withURL("http://127.0.0.1:8000");
$add = $client->add(1,2);

```

> addObjectClass refer to：

Interfaces
----------

[](#interfaces)

### Server Interface

[](#server-interface)

```
interface Server
{
    /**
     * Callback binding:
     * @param $method
     * @param Closure $callback
     * @return $this
     */
    public function addCallback($method, Closure $callback);

    /**
     * Class/Method binding:
     * @param $objectOrClass
     * @return $this
     */
    public function addObjectClass($objectOrClass);

    /**
     * List of users to allow
     * @param array $authentications
     * @return $this
     */
    public function withAuthentications(array $authentications);

    /**
     * IP client restrictions
     * @param array $hosts
     * @return $this
     */
    public function allowHosts(array $hosts);

    /**
     * @return mixed
     */
    public function start();
}

```

### Client Interface

[](#client-interface)

```
interface Client
{
    /**
     * @param $url
     * @return $this
     */
    public function withURL($url);

    /**
     * @param $timeout
     * @return $this
     */
    public function withTimeout($timeout);

    /**
     * @return $this
     */
    public function withDebug();

    /**
     * @param $username
     * @param $password
     * @return $this
     */
    public function withAuthentication($username, $password);

    /**
     * @param CHandle $handle
     * @return $this
     */
    public function withHandle(CHandle $handle);
}

```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Unknown

Total

1

Last Release

521d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/28b119a234a9963e2266b2b493c037b1d7f01d3e17a06a3ffe94481549efa47b?d=identicon)[1751212020](/maintainers/1751212020)

---

Top Contributors

[![chihqiang](https://avatars.githubusercontent.com/u/40115555?v=4)](https://github.com/chihqiang "chihqiang (6 commits)")

---

Tags

httpjsonrpcjsonrpcphprpcHprose

### Embed Badge

![Health badge](/badges/pkg6-easy-rpc/health.svg)

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

###  Alternatives

[hprose/hprose

It is a modern, lightweight, cross-language, cross-platform, object-oriented, high performance, remote dynamic communication middleware. It is not only easy to use, but powerful. You just need a little time to learn, then you can use it to easily construct cross language cross platform distributed application system.

2.1k215.3k37](/packages/hprose-hprose)[hprose/hprose-swoole

Hprose asynchronous client &amp; standalone server based on swoole

17928.9k9](/packages/hprose-hprose-swoole)[hprose/hprose-yii

Hprose Server for Yii 2

357.1k](/packages/hprose-hprose-yii)

PHPackages © 2026

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