{"id":17422196,"url":"https://github.com/jnordberg/wsrpc","last_synced_at":"2025-12-22T21:01:49.362Z","repository":{"id":20348896,"uuid":"89717965","full_name":"jnordberg/wsrpc","owner":"jnordberg","description":"node.js/browser protobuf rpc over binary websockets","archived":false,"fork":false,"pushed_at":"2022-12-30T18:55:57.000Z","size":2408,"stargazers_count":104,"open_issues_count":16,"forks_count":11,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-11T19:08:00.816Z","etag":null,"topics":["browser","nodejs","rpc","websockets"],"latest_commit_sha":null,"homepage":"https://jnordberg.github.io/wsrpc/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jnordberg.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":"2017-04-28T15:12:57.000Z","updated_at":"2025-01-22T01:42:37.000Z","dependencies_parsed_at":"2023-01-13T20:55:37.387Z","dependency_job_id":null,"html_url":"https://github.com/jnordberg/wsrpc","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnordberg%2Fwsrpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnordberg%2Fwsrpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnordberg%2Fwsrpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnordberg%2Fwsrpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jnordberg","download_url":"https://codeload.github.com/jnordberg/wsrpc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248733069,"owners_count":21152952,"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":["browser","nodejs","rpc","websockets"],"created_at":"2024-10-17T03:11:04.548Z","updated_at":"2025-12-22T21:01:44.323Z","avatar_url":"https://github.com/jnordberg.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# [wsrpc](https://github.com/jnordberg/wsrpc) [![Build Status](https://img.shields.io/travis/jnordberg/wsrpc.svg?style=flat-square)](https://travis-ci.org/jnordberg/wsrpc) [![Coverage Status](https://img.shields.io/coveralls/jnordberg/wsrpc.svg?style=flat-square)](https://coveralls.io/github/jnordberg/wsrpc?branch=master) [![Package Version](https://img.shields.io/npm/v/wsrpc.svg?style=flat-square)](https://www.npmjs.com/package/wsrpc) ![License](https://img.shields.io/npm/l/wsrpc.svg?style=flat-square)\n\nnode.js/browser protobuf rpc over binary websockets.\n\n* **[Demo](https://johan-nordberg.com/wspainter)** ([source](https://github.com/jnordberg/wsrpc/tree/master/examples/painter))\n* [Documentation](https://jnordberg.github.io/wsrpc/)\n* [Issues](https://github.com/jnordberg/wsrpc/issues)\n\n---\n\nMinimal example\n---------------\n\nmy-service.proto\n```protobuf\nservice MyService {\n    rpc SayHello (HelloRequest) returns (HelloResponse) {}\n}\n\nmessage HelloRequest {\n    required string name = 1;\n}\n\nmessage HelloResponse {\n    required string text = 1;\n}\n```\n\nserver.js\n```typescript\nconst wsrpc = require('wsrpc')\nconst protobuf = require('protobufjs')\n\nconst proto = protobuf.loadSync('my-service.proto')\n\nconst server = new wsrpc.Server(proto.lookupService('MyService'), { port: 4242 })\n\nserver.implement('sayHello', async (request) =\u003e {\n    return {text: `Hello ${ request.name }!`}\n})\n```\n\nclient.js\n```typescript\nconst wsrpc = require('wsrpc')\nconst protobuf = require('protobufjs')\n\nconst proto = protobuf.loadSync('my-service.proto')\n\nconst client = new wsrpc.Client('ws://localhost:4242', proto.lookupService('MyService'))\n\nconst response = await client.service.sayHello({name: 'world'})\nconsole.log(response) // Hello world!\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjnordberg%2Fwsrpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjnordberg%2Fwsrpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjnordberg%2Fwsrpc/lists"}