{"id":18299903,"url":"https://github.com/gamestdio/websocket","last_synced_at":"2025-07-17T07:08:38.039Z","repository":{"id":57397536,"uuid":"46386896","full_name":"gamestdio/websocket","owner":"gamestdio","description":"WebSocket client with reconnect back-off feature. Works in the browser, Node.js and React Native.","archived":false,"fork":false,"pushed_at":"2019-07-15T17:49:36.000Z","size":91,"stargazers_count":64,"open_issues_count":0,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-21T19:40:54.690Z","etag":null,"topics":["react-native","websockets"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/gamestdio.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-11-18T01:26:35.000Z","updated_at":"2024-08-01T02:38:53.000Z","dependencies_parsed_at":"2022-08-31T15:01:06.465Z","dependency_job_id":null,"html_url":"https://github.com/gamestdio/websocket","commit_stats":null,"previous_names":["gamestdio/websocket.js"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gamestdio/websocket","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamestdio%2Fwebsocket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamestdio%2Fwebsocket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamestdio%2Fwebsocket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamestdio%2Fwebsocket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gamestdio","download_url":"https://codeload.github.com/gamestdio/websocket/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamestdio%2Fwebsocket/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265575530,"owners_count":23790784,"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","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":["react-native","websockets"],"created_at":"2024-11-05T15:10:40.248Z","updated_at":"2025-07-17T07:08:38.024Z","avatar_url":"https://github.com/gamestdio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @gamestdio/websocket\n\nWebSocket with reconnect back-off feature.\n\nFor Node.js support, you should install the `ws` module in your project.\n\n## Installation\n\n`npm i @gamestdio/websocket`\n\n## Usage\n\n`WebSocketClient` behaves exactly in the same way as `WebSocket`.\n\nIt accepts an optional third parameter, which is used to configure\n[backoff](https://github.com/MathieuTurcotte/node-backoff) feature.\n\n```javascript\n// fibonacci backoff strategy\nvar conn = new WebSocketClient('ws://' + host + ':8080', [], {\n  backoff: \"fibonacci\"\n});\n```\n\n```javascript\n// exponential backoff strategy\nvar conn = new WebSocketClient('ws://' + host + ':8080', [], {\n  backoff: \"exponential\"\n});\n```\n\n## Event Listeners\n\n- onclose\n- onerror\n- onmessage\n- onopen\n- onreconnect\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgamestdio%2Fwebsocket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgamestdio%2Fwebsocket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgamestdio%2Fwebsocket/lists"}