{"id":18556355,"url":"https://github.com/rsocket/rsocket-php","last_synced_at":"2025-07-22T20:34:57.474Z","repository":{"id":45966806,"uuid":"244769628","full_name":"rsocket/rsocket-php","owner":"rsocket","description":"RSocket PHP implementation using ReactPHP","archived":false,"fork":false,"pushed_at":"2022-01-30T04:13:07.000Z","size":119,"stargazers_count":11,"open_issues_count":3,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-11T22:06:25.229Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rsocket.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-04T00:13:39.000Z","updated_at":"2025-04-15T01:13:57.000Z","dependencies_parsed_at":"2022-08-20T12:20:15.638Z","dependency_job_id":null,"html_url":"https://github.com/rsocket/rsocket-php","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/rsocket/rsocket-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsocket%2Frsocket-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsocket%2Frsocket-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsocket%2Frsocket-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsocket%2Frsocket-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rsocket","download_url":"https://codeload.github.com/rsocket/rsocket-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsocket%2Frsocket-php/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266567754,"owners_count":23949409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T21:30:01.486Z","updated_at":"2025-07-22T20:34:57.446Z","avatar_url":"https://github.com/rsocket.png","language":"PHP","readme":"RSocket PHP\n================\n[![Composer](https://img.shields.io/packagist/v/rsocket/rsocket-php)](https://packagist.org/packages/rsocket/rsocket-php)\n\nRSocket PHP SDK based on ReactPHP and RxPHP.\n\n# Requirements\n\n* PHP 7.4+\n\n# Examples\n\n### RSocket Client\n\n```php\nScheduler::setDefaultFactory(function () {\n    return new Scheduler\\EventLoopScheduler(Loop::get());\n});\n\n$rsocketPromise = RSocketConnector::create()-\u003econnect(\"tcp://127.0.0.1:42252\");\n\n$rsocketPromise-\u003ethen(function (RSocket $rsocket) {\n    $observablePayload = $rsocket-\u003erequestResponse(Payload::fromText(\"text/plain\", \"Ping\"));\n    $observablePayload-\u003esubscribe(\n        function (Payload $x) {\n            echo 'Result: ' . $x-\u003egetDataUtf8();\n        }\n    );\n});\n```\n\n### RSocket Server\n\n```php\nScheduler::setDefaultFactory(function () {\n    return new Scheduler\\EventLoopScheduler(Loop::get());\n});\n\n$listenUri = \"tcp://127.0.0.1:42252\";\n$socketAcceptor = CallableSocketAcceptor::handle(function ($setupPayload, $sendingRSocket) {\n    return AbstractRSocket::requestResponseHandler(function ($payload) {\n        return Observable::of(Payload::fromText(\"metadata\", \"PONG\"));\n    });\n});\n$server = RSocketServer::create($socketAcceptor)-\u003ebind($listenUri);\nprint(\"RSocket Server started on ${listenUri}\");\n```\n\n# RSocket Service stub and routing\n\nPlease check https://github.com/rsocket/rsocket-php/tree/master/tests/route\n\n# RSocket\n\n- Operations\n    - [x] REQUEST_FNF\n    - [x] REQUEST_RESPONSE\n    - [x] REQUEST_STREAM\n    - [ ] REQUEST_CHANNEL\n    - [x] METADATA_PUSH\n- More Operations\n    - [x] Error\n    - [ ] Cancel\n    - [x] Keepalive\n- QoS\n    - [ ] RequestN\n    - [ ] Lease\n- Transport\n    - [x] TCP\n    - [x] Websocket\n- High Level APIs\n    - [x] Client\n    - [x] Server\n- Misc\n    - [x] RxPHP\n\n# References\n\n* RSocket: https://rsocket.io\n* ReactPHP: https://github.com/reactphp/reactphp\n* ReactPHP Projects: https://github.com/reactphp/reactphp/wiki/Users\n* RxPHP: https://github.com/ReactiveX/RxPHP\n* New .phpstorm.meta.php features: https://blog.jetbrains.com/phpstorm/2019/02/new-phpstorm-meta-php-features/\n* PHP Reactive Programming: https://www.packtpub.com/web-development/php-reactive-programming\n* Ratchet: Asynchronous WebSocket server https://github.com/ratchetphp/Ratchet\n* Pawl: asynchronous WebSocket client https://github.com/ratchetphp/Pawl\n* PHP 8: Attributes: https://stitcher.io/blog/attributes-in-php-8","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsocket%2Frsocket-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frsocket%2Frsocket-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsocket%2Frsocket-php/lists"}