PHPackages                             rsocket/rsocket-php - 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. rsocket/rsocket-php

ActiveLibrary

rsocket/rsocket-php
===================

RSocket PHP SDK based on ReactPHP and RxPHP

0.2.0(4y ago)121883[3 issues](https://github.com/rsocket/rsocket-php/issues)Apache License 2.0PHPPHP &gt;=7.4CI failing

Since Feb 22Pushed 4y ago2 watchersCompare

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

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

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

[](#rsocket-php)

[![Composer](https://camo.githubusercontent.com/b581b8c93488cb3cfb6dfaef4032a718aaf1cc0e1b08b4c503ce3e3ede0a3fac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72736f636b65742f72736f636b65742d706870)](https://packagist.org/packages/rsocket/rsocket-php)

RSocket PHP SDK based on ReactPHP and RxPHP.

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

[](#requirements)

- PHP 7.4+

Examples
========

[](#examples)

### RSocket Client

[](#rsocket-client)

```
Scheduler::setDefaultFactory(function () {
    return new Scheduler\EventLoopScheduler(Loop::get());
});

$rsocketPromise = RSocketConnector::create()->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 () {
    return new Scheduler\EventLoopScheduler(Loop::get());
});

$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($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

25

—

LowBetter than 37% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.4% 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 ~706 days

Total

2

Last Release

1571d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e9e135ecdbebb825389b2f01afba25611e96f0de703fd8e077ce7106eeefa256?d=identicon)[linux\_china](/maintainers/linux_china)

---

Top Contributors

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

---

Tags

rpcreactiversocket

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[team-reflex/discord-php

An unofficial API to interact with the voice and text service Discord.

1.1k379.4k24](/packages/team-reflex-discord-php)[gos/web-socket-bundle

Symfony Web Socket Bundle

6202.2M8](/packages/gos-web-socket-bundle)[web3p/web3.php

Ethereum web3 interface.

1.3k325.5k41](/packages/web3p-web3php)[rector/rector-src

Instant Upgrade and Automated Refactoring of any PHP code

134391.5k12](/packages/rector-rector-src)[clue/docker-react

Async, event-driven access to the Docker Engine API, built on top of ReactPHP.

113154.9k1](/packages/clue-docker-react)[rx/websocket

Websockets for PHP using Rx

34181.5k2](/packages/rx-websocket)

PHPackages © 2026

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