{"id":20662574,"url":"https://github.com/system233/ws-bi-rpc","last_synced_at":"2026-04-17T20:31:43.352Z","repository":{"id":57702822,"uuid":"495851547","full_name":"System233/ws-bi-rpc","owner":"System233","description":"Bidirectional RPC based on WebSocket.","archived":false,"fork":false,"pushed_at":"2022-05-24T14:57:01.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-18T07:19:03.206Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/System233.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":"2022-05-24T14:08:57.000Z","updated_at":"2022-05-24T14:09:10.000Z","dependencies_parsed_at":"2022-09-26T21:11:27.540Z","dependency_job_id":null,"html_url":"https://github.com/System233/ws-bi-rpc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/System233%2Fws-bi-rpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/System233%2Fws-bi-rpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/System233%2Fws-bi-rpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/System233%2Fws-bi-rpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/System233","download_url":"https://codeload.github.com/System233/ws-bi-rpc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242799115,"owners_count":20186887,"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":[],"created_at":"2024-11-16T19:14:39.135Z","updated_at":"2025-12-06T20:01:18.574Z","avatar_url":"https://github.com/System233.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\n Copyright (c) 2022 System233\n \n This software is released under the MIT License.\n https://opensource.org/licenses/MIT\n--\u003e\n\n# WS-BI-RPC\n\nBidirectional RPC based on WebSocket.\n\n## Easy to use\n```ts\nimport { WebSocketServer,WebSocket ,WebSocketRPC } from \"..\";\n\nclass ServerHander {\n    say(message: string) {\n        console.log('message from client:', message)\n    }\n}\nclass ClientHander {\n    test(message: string) {\n        console.log('message from server :', message)\n    }\n}\nconst server = new WebSocketServer({ host: 'localhost', port: 8899 });\nserver.on('connection', async (socket) =\u003e {\n    const rpc = new WebSocketRPC\u003cClientHander\u003e(socket, new ServerHander);\n    await rpc.call('test', 'hello');\n});\n\n\nconst ws = new WebSocket('ws://localhost:8899');\n\nws.on('open', async () =\u003e {\n    const client = new WebSocketRPC\u003cServerHander\u003e(ws, new ClientHander);\n    await client.call('say', 'say message');\n})\n\n\n// message from server : hello\n// message from client: say message\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystem233%2Fws-bi-rpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsystem233%2Fws-bi-rpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystem233%2Fws-bi-rpc/lists"}