{"id":50306658,"url":"https://github.com/nahida-aa/siokit","last_synced_at":"2026-05-28T17:01:06.611Z","repository":{"id":360953294,"uuid":"1252376329","full_name":"Nahida-aa/siokit","owner":"Nahida-aa","description":"Socket.IO-compatible server \u0026 client","archived":false,"fork":false,"pushed_at":"2026-05-28T16:14:46.000Z","size":151,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-28T16:15:02.027Z","etag":null,"topics":["socket-io","websocket"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Nahida-aa.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-28T13:09:24.000Z","updated_at":"2026-05-28T16:14:52.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Nahida-aa/siokit","commit_stats":null,"previous_names":["nahida-aa/siokit"],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/Nahida-aa/siokit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nahida-aa%2Fsiokit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nahida-aa%2Fsiokit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nahida-aa%2Fsiokit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nahida-aa%2Fsiokit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nahida-aa","download_url":"https://codeload.github.com/Nahida-aa/siokit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nahida-aa%2Fsiokit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33617718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["socket-io","websocket"],"created_at":"2026-05-28T17:00:27.606Z","updated_at":"2026-05-28T17:01:06.584Z","avatar_url":"https://github.com/Nahida-aa.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# siokit\n\nSocket.IO-compatible server \u0026 client library written in TypeScript.\n\n- **Engine.IO v4** — WebSocket and HTTP long-polling transports\n- **Socket.IO protocol** — typed events, namespaces, acknowledgements, binary attachments\n- **Runtime-agnostic** — works with Bun, Hono, Node.js (via adapters)\n- **Zero dependencies** at runtime — only `siokit-core` and `siokit-parser` sub-packages\n\n## Packages\n\n| Package | Description |\n|---------|-------------|\n| `siokit` | Server — EIO + SIO, websocket \u0026 polling, namespaces |\n| `siokit-client` | Client — WebSocket transport, typed emit/on/emitWithAck |\n| `siokit-parser` | Socket.IO packet encode/decode + binary attachments |\n| `siokit-core` | Generic types, event bus, and shared primitives |\n\n## Quick Start\n\n### Server\n\n```ts\nimport { newServer } from 'siokit'\nimport { newSocket } from 'siokit-client'\n\nconst app = newServer()\n\napp.on('connection', (socket) =\u003e {\n  socket.on('hello', () =\u003e {\n    socket.emit('reply', 'world')\n  })\n})\n\n// Bun\nBun.serve({\n  port: 3000,\n  fetch(req, srv) {\n    if (srv.upgrade(req)) return\n    return app.fetch(req)\n  },\n  websocket: app.websocket,\n})\n```\n\n### Client\n\n```ts\nconst socket = newSocket('http://localhost:3000')\nsocket.on('connect', () =\u003e {\n  socket.emit('hello')\n  socket.on('reply', (msg) =\u003e console.log(msg)) // 'world'\n})\n```\n\n### Binary\n\n```ts\nsocket.emit('data', new Uint8Array([1, 2, 3]))\nsocket.on('binaryReply', (data) =\u003e {\n  // data instanceof Uint8Array\n})\n```\n\n### Acknowledgements\n\n```ts\nconst result = await socket.emitWithAck('ping')\n// result === 'pong'\n```\n\n## Architecture\n\n```\nsiokit-core       — event.ts + eventBus.ts (zero deps)\n       ↓\nsiokit-parser     — encode, decode, binary (dep: core)\n       ↓\nsiokit-client     — WebSocket transport, client socket (dep: core + parser)\nsiokit            — EIO + SIO server (dep: core + parser)\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnahida-aa%2Fsiokit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnahida-aa%2Fsiokit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnahida-aa%2Fsiokit/lists"}