PHPackages                             aksalj/rsocket - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. aksalj/rsocket

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

aksalj/rsocket
==============

RSocket PHP SDK based on ReactPHP and RxPHP

0.1.1(6y ago)012Apache License 2.0PHPPHP &gt;=7.4

Since Feb 22Pushed 4y agoCompare

[ Source](https://github.com/aksalj/rsocket-php)[ Packagist](https://packagist.org/packages/aksalj/rsocket)[ Docs](https://github.com/aksalj/rsocket-php)[ RSS](/packages/aksalj-rsocket/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (6)Versions (6)Used By (0)

RSocket PHP
===========

[](#rsocket-php)

[![Composer](https://camo.githubusercontent.com/b1f78a594e879841ff2116ba9abf0d607d28d0175ea870059792b0f21487d35c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616b73616c6a2f72736f636b6574)](https://packagist.org/packages/aksalj/rsocket)

RSocket PHP SDK based on ReactPHP and RxPHP.

Requirements
============

[](#requirements)

- PHP 7.4.x

Examples
========

[](#examples)

### RSocket Client

[](#rsocket-client)

```
Scheduler::setDefaultFactory(function () use ($loop) {
    return new Scheduler\EventLoopScheduler($loop);
});

$rsocketPromise = RSocketConnector::create($loop)->connect("tcp://127.0.0.1:42252");

$rsocketPromise->then(function (RSocket $rsocket) {
    $observablePayload = $rsocket->requestResponse(Payload::fromText("text/plain", "Ping"));
    $observablePayload->subscribe(
        function (Payload $x) {
            echo 'Result: ' . $x->getDataUtf8();
        }
    );
});
```

### RSocket Server

[](#rsocket-server)

```
Scheduler::setDefaultFactory(function () use ($loop) {
    return new Scheduler\EventLoopScheduler($loop);
});

$listenUri = "tcp://127.0.0.1:42252";
$socketAcceptor = CallableSocketAcceptor::handle(function ($setupPayload, $sendingRSocket) {
    return AbstractRSocket::requestResponseHandler(function ($payload) {
        return Observable::of(Payload::fromText("metadata", "PONG"));
    });
});
$server = RSocketServer::create($loop, $socketAcceptor)->bind($listenUri);
print("RSocket Server started on ${listenUri}");
```

RSocket Service stub and routing
================================

[](#rsocket-service-stub-and-routing)

Please check

RSocket
=======

[](#rsocket)

- Operations
    - REQUEST\_FNF
    - REQUEST\_RESPONSE
    - REQUEST\_STREAM
    - REQUEST\_CHANNEL
    - METADATA\_PUSH
- More Operations
    - Error
    - Cancel
    - Keepalive
- QoS
    - RequestN
    - Lease
- Transport
    - TCP
    - Websocket
- High Level APIs
    - Client
    - Server
- Misc
    - RxPHP

References
==========

[](#references)

- RSocket:
- ReactPHP:
- ReactPHP Projects:
- RxPHP:
- New .phpstorm.meta.php features:
- PHP Reactive Programming:
- Ratchet: Asynchronous WebSocket server
- Pawl: asynchronous WebSocket client
- PHP 8: Attributes:

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.1% 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

Every ~0 days

Total

2

Last Release

2276d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f9e19f4ada3ababecea202f9ed0b4c61a867fa0bc4603bb0fc0b7582b8516cea?d=identicon)[aksalj](/maintainers/aksalj)

---

Top Contributors

[![linux-china](https://avatars.githubusercontent.com/u/46711?v=4)](https://github.com/linux-china "linux-china (134 commits)")[![aksalj](https://avatars.githubusercontent.com/u/2534772?v=4)](https://github.com/aksalj "aksalj (7 commits)")[![ryabenko-pro](https://avatars.githubusercontent.com/u/572611?v=4)](https://github.com/ryabenko-pro "ryabenko-pro (3 commits)")

---

Tags

rpcreactiversocket

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/aksalj-rsocket/health.svg)

```
[![Health](https://phpackages.com/badges/aksalj-rsocket/health.svg)](https://phpackages.com/packages/aksalj-rsocket)
```

###  Alternatives

[reactivex/rxphp

Reactive extensions for php.

1.7k3.2M49](/packages/reactivex-rxphp)[vohof/transmission

Awesome PHP JSON-RPC client library for Transmission

181.7k](/packages/vohof-transmission)

PHPackages © 2026

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