{"id":45779286,"url":"https://github.com/plesk/ratchetphp","last_synced_at":"2026-02-26T10:58:17.822Z","repository":{"id":175938224,"uuid":"654636234","full_name":"plesk/ratchetphp","owner":"plesk","description":"Asynchronous WebSocket server","archived":false,"fork":false,"pushed_at":"2025-03-10T09:16:48.000Z","size":1290,"stargazers_count":16,"open_issues_count":1,"forks_count":7,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-09-27T22:52:01.771Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://socketo.me","language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"ratchetphp/Ratchet","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plesk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-16T15:10:07.000Z","updated_at":"2025-07-15T15:14:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"2cd84b98-cced-4d92-852d-76becf8ab64c","html_url":"https://github.com/plesk/ratchetphp","commit_stats":null,"previous_names":["plesk/ratchet"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/plesk/ratchetphp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plesk%2Fratchetphp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plesk%2Fratchetphp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plesk%2Fratchetphp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plesk%2Fratchetphp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plesk","download_url":"https://codeload.github.com/plesk/ratchetphp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plesk%2Fratchetphp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29856783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T08:51:08.701Z","status":"ssl_error","status_checked_at":"2026-02-26T08:50:19.607Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-02-26T10:58:17.228Z","updated_at":"2026-02-26T10:58:17.801Z","avatar_url":"https://github.com/plesk.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ratchet\n\n[![GitHub Actions](https://github.com/plesk/ratchetphp/workflows/CI/badge.svg)](https://github.com/plesk/ratchetphp/actions?query=workflow%3A%22CI%22+branch%3Amaster)\n[![Latest Stable Version](http://poser.pugx.org/plesk/ratchetphp/v)](https://packagist.org/packages/plesk/ratchetphp)\n\nA PHP library for asynchronously serving WebSockets.\nBuild up your application through simple interfaces and re-use your application without changing any of its code just by combining different components.\n\n## Requirements\n\nShell access is required and root access is recommended.\nTo avoid proxy/firewall blockage it's recommended WebSockets are requested on port 80 or 443 (SSL), which requires root access.\nIn order to do this, along with your sync web stack, you can either use a reverse proxy or two separate machines.\nYou can find more details in the [server conf docs](http://socketo.me/docs/deploy#server_configuration).\n\n### Documentation\n\nUser and API documentation is available on Ratchet's website: http://socketo.me\n\nSee https://github.com/cboden/Ratchet-examples for some out-of-the-box working demos using Ratchet.\n\nNeed help?  Have a question?  Want to provide feedback?  Write a message on the [Google Groups Mailing List](https://groups.google.com/forum/#!forum/ratchet-php).\n\n---\n\n### A quick example\n\n```php\n\u003c?php\n// Make sure composer dependencies have been installed\nrequire __DIR__ . '/vendor/autoload.php';\n\nuse Ratchet\\MessageComponentInterface;\nuse Ratchet\\ConnectionInterface;\n\n/**\n * chat.php\n * Send any incoming messages to all connected clients (except sender)\n */\nclass MyChat implements MessageComponentInterface\n{\n    protected $clients;\n\n    public function __construct()\n    {\n        $this-\u003eclients = new \\SplObjectStorage();\n    }\n\n    public function onOpen(ConnectionInterface $conn)\n    {\n        $this-\u003eclients-\u003eattach($conn);\n    }\n\n    public function onMessage(ConnectionInterface $from, $msg)\n    {\n        foreach ($this-\u003eclients as $client) {\n            if ($from != $client) {\n                $client-\u003esend($msg);\n            }\n        }\n    }\n\n    public function onClose(ConnectionInterface $conn)\n    {\n        $this-\u003eclients-\u003edetach($conn);\n    }\n\n    public function onError(ConnectionInterface $conn, \\Exception $e)\n    {\n        $conn-\u003eclose();\n    }\n}\n\n// Run the server application through the WebSocket protocol on port 8080\n$app = new Ratchet\\App('localhost', 8080);\n$app-\u003eroute('/chat', new MyChat(), array('*'));\n$app-\u003eroute('/echo', new Ratchet\\Server\\EchoServer, array('*'));\n$app-\u003erun();\n```\n\n    $ php chat.php\n\n```javascript\n// Then some JavaScript in the browser:\nvar conn = new WebSocket('ws://localhost:8080/echo');\nconn.onmessage = function(e) { console.log(e.data); };\nconn.onopen = function(e) { conn.send('Hello Me!'); };\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplesk%2Fratchetphp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplesk%2Fratchetphp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplesk%2Fratchetphp/lists"}