{"id":14978200,"url":"https://github.com/rxtoolkit/socketio","last_synced_at":"2026-02-12T18:02:41.225Z","repository":{"id":214798195,"uuid":"419752548","full_name":"rxtoolkit/socketio","owner":"rxtoolkit","description":"🚰 RxJS operators for working with Socket.io (v4 or lower) servers","archived":false,"fork":false,"pushed_at":"2024-02-16T18:40:05.000Z","size":683,"stargazers_count":1,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-03T07:39:48.897Z","etag":null,"topics":["fp","functional-programming","observables","package","reactive-programming","realtime","rxjs","socket-io","socketio","streaming","websocket","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/rxtoolkit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-21T14:17:22.000Z","updated_at":"2024-01-02T15:47:36.000Z","dependencies_parsed_at":"2023-12-30T22:04:27.133Z","dependency_job_id":"2b210ef0-fe84-4b5b-b796-8c7c080bbd58","html_url":"https://github.com/rxtoolkit/socketio","commit_stats":{"total_commits":34,"total_committers":3,"mean_commits":"11.333333333333334","dds":"0.17647058823529416","last_synced_commit":"7e7c24cb5ea9df73fd3a6a02cda4dde27ed39167"},"previous_names":["rxtoolkit/socketio"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/rxtoolkit/socketio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rxtoolkit%2Fsocketio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rxtoolkit%2Fsocketio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rxtoolkit%2Fsocketio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rxtoolkit%2Fsocketio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rxtoolkit","download_url":"https://codeload.github.com/rxtoolkit/socketio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rxtoolkit%2Fsocketio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29375615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T08:51:36.827Z","status":"ssl_error","status_checked_at":"2026-02-12T08:51:26.849Z","response_time":55,"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":["fp","functional-programming","observables","package","reactive-programming","realtime","rxjs","socket-io","socketio","streaming","websocket","websockets"],"created_at":"2024-09-24T13:57:02.570Z","updated_at":"2026-02-12T18:02:41.207Z","avatar_url":"https://github.com/rxtoolkit.png","language":"JavaScript","readme":"# @rxtk/socketio\n\u003e 🚰 Hooks for RxJS Observables to interface with Socket.io (v4) servers\n\n```bash\nnpm i @rxtk/socketio\n```\n\n```bash\nyarn add @rxtk/socketio\n```\n\n## Compatability\n\n| Platform | Support |\n| :--- | :--- |\n| node.js \\(\u0026gt;10.0\\) | ✅ |\n| Browsers | ✅ |\n| React Native | ✅ |\n| Electron | ✅ |\n\n## API\n\n### `conduit()`\nOpens a two-way channel of communication with the server.  Items sent into\nthe operator will be sent to the server.  By default, the output stream is the messages\nsent back from the server.\n```js\nimport {from} from 'rxjs';\nimport {conduit} from '@rxtk/socketio';\n\nconst messageIn$ = from([\n  {topic: 'message', body: 'yarrr'},\n  {topic: 'message', body: 'arrr matey'},\n  {topic: 'message', body: 'Vitamin C? Never heard of it.'},\n  {topic: 'message', body: 'Why is all the rum gone?'},\n]);\n\nconst socketConfig = {\n  url: 'http://localhost:9080/ws', // socket.io server\n  topics: ['message'], // topics to subscribe to. (Defaults to ['message']).\n  // the socket options get passed directly to the Socket.io instance, allowing\n  // any customization that the socket.io client supports.\n  socketOptions: {\n    transports: ['websocket'],\n    auth: {token: 'secretjwttoken'},\n  },\n}; \n// the conduit operator sends messages from messageIn$ and emits messages \n// from the server\nconst messageBack$ = messageIn$.pipe(conduit({...socketConfig}));\nmessageBack$.subscribe(console.log);\nmessageBack$.error$.subscribe(console.error); // optional: handle errors\n// {topic: 'message', body: 'Welcome Matey.'}\n// {topic: 'message', body: 'Yo ho. Yo ho. I am a message from the server.'}\n```\n\nYou can also send binary data:\n```js\nimport {from} from 'rxjs';\nimport {conduit} from '@rxtk/socketio';\n\nconst messageIn$ = from([\n  {topic: 'next-audio-chunk', index: 0, binary: Buffer.from('foobar', 'base64')},\n  {topic: 'next-audio-chunk', index: 1, binary: Buffer.from('foobar', 'base64')},\n]);\nconst socketConfig = {\n  url: 'http://localhost:9080/ws',\n  topics: ['message', 'audio-received'],\n};\nmessageIn$.pipe(conduit({...socketConfig}));\n// {topic: 'audio-received', index: 0}\n// {topic: 'audio-received', index: 1}\n```\n\n## Advanced configuration\nThe library also supports some advanced features commonly needed in real applications:\n- sending binary\n- verifying receipt of messages before sending the next\n- customizing the socket.io client\n- adding serializers/deserializers\n- handling disconnections\n\nSee the the code (`src/operators/conduit`) for advanced configuration options.  This is a pretty lightweight wrapper and the code should be pretty easy to read and understand.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frxtoolkit%2Fsocketio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frxtoolkit%2Fsocketio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frxtoolkit%2Fsocketio/lists"}