{"id":36994469,"url":"https://github.com/calcinai/bolt","last_synced_at":"2026-01-13T23:46:42.217Z","repository":{"id":62499083,"uuid":"44093039","full_name":"calcinai/bolt","owner":"calcinai","description":"Asynchronous WebSocket client","archived":false,"fork":false,"pushed_at":"2019-05-31T08:10:43.000Z","size":30,"stargazers_count":6,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-05T06:41:31.212Z","etag":null,"topics":["bolt","php-websocket","ratchet","react","websockets"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/calcinai.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":"2015-10-12T08:04:55.000Z","updated_at":"2021-09-27T08:08:56.000Z","dependencies_parsed_at":"2022-11-02T11:46:47.833Z","dependency_job_id":null,"html_url":"https://github.com/calcinai/bolt","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/calcinai/bolt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calcinai%2Fbolt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calcinai%2Fbolt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calcinai%2Fbolt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calcinai%2Fbolt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/calcinai","download_url":"https://codeload.github.com/calcinai/bolt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calcinai%2Fbolt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28405304,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["bolt","php-websocket","ratchet","react","websockets"],"created_at":"2026-01-13T23:46:41.631Z","updated_at":"2026-01-13T23:46:42.212Z","avatar_url":"https://github.com/calcinai.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bolt\n\nAsynchronous WebSocket client client library for PHP. Supports HyBi, ~~as well as Hixie #76~~ (no point).\n\nThis was built purely to be a client, as the majority of the WS clients available also contain servers and are very bloated.\n\n# Installation\n    \nUsing composer:\n\n    composer require calcinai/bolt   \n\n\n# Usage\n       \nSince this really lends itself to being an asynchronous app, it is built to use the React event loops and resolver since there's a good \nchance they'll be in your project already and this lets you attach to the same loop.\n\n```php\n$loop = \\React\\EventLoop\\Factory::create();\n$dns_factory = new React\\Dns\\Resolver\\Factory();\n$resolver = $dns_factory-\u003ecreateCached('8.8.8.8', $loop);\n\n$client = new \\Calcinai\\Bolt\\Client('ws://127.0.0.1:1337/chat', $loop, $resolver);\n\n//Most WS servers will complain/forbid if there is no origin header\n$client-\u003esetOrigin('127.0.0.1');\n\n$client-\u003econnect();\n\n\n$client-\u003eon('stateChange', function($newState){\n    echo \"State changed to: $newState\\n\";\n});\n\n$client-\u003eon('message', function($message) use ($client){\n    echo \"New message: \\n\";\n    echo $message;\n    \n    $client-\u003esend('This is a response message');\n});\n\n$loop-\u003erun();\n```\n   \n   \nOther available events are ```connecting```, ```connect```, ```disconnecting```, ```disconnect```\n\n\nHTTP basic auth is also supported via the URI inf the form ```user:pass@host```\n\n\nAny feedback is most welcome\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalcinai%2Fbolt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcalcinai%2Fbolt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalcinai%2Fbolt/lists"}