{"id":21663335,"url":"https://github.com/polixjs/polix-rpc","last_synced_at":"2025-10-05T13:27:47.608Z","repository":{"id":32958204,"uuid":"138671716","full_name":"polixjs/polix-rpc","owner":"polixjs","description":"rpc plugin for polix","archived":false,"fork":false,"pushed_at":"2022-02-11T13:46:55.000Z","size":21,"stargazers_count":10,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T19:40:51.470Z","etag":null,"topics":["ast","kirito","nodejs","parser","rpc","tokenizer"],"latest_commit_sha":null,"homepage":"https://cnodejs.org/topic/5b63b25e792f59ae501bf71c","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/polixjs.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":"2018-06-26T02:02:47.000Z","updated_at":"2023-06-29T16:02:34.000Z","dependencies_parsed_at":"2022-07-25T18:32:32.889Z","dependency_job_id":null,"html_url":"https://github.com/polixjs/polix-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/polixjs%2Fpolix-rpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polixjs%2Fpolix-rpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polixjs%2Fpolix-rpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polixjs%2Fpolix-rpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/polixjs","download_url":"https://codeload.github.com/polixjs/polix-rpc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248497901,"owners_count":21113982,"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":["ast","kirito","nodejs","parser","rpc","tokenizer"],"created_at":"2024-11-25T10:21:06.160Z","updated_at":"2025-10-05T13:27:42.570Z","avatar_url":"https://github.com/polixjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# polix-rpc\nrpc plugin for polix\n\n[![Travis](https://img.shields.io/travis/polixjs/polix-rpc.svg?style=for-the-badge)](https://travis-ci.org/polixjs/polix-rpc)\n\n## 架构图\n[![polix-rpc](https://raw.githubusercontent.com/rickyes/rickyes.github.io/master/image/mqt_rpc.jpg)](https://raw.githubusercontent.com/rickyes/rickyes.github.io/master/image/mqt_rpc.jpg)\n\n## Get Start\n\n#### Kirito File\n``` shell\n# test\n\nservice testService {\n  method ping (reqMsg, resMsg)\n}\n\nstruct reqMsg {\n  @1 age = Int16;\n  @2 name = Text;\n}\n\nstruct resMsg {\n  @1 age = Int16;\n  @2 name = Text;\n}\n```\n\n#### Server\n``` js\n'use strict';\n\nconst pRPC = require('polix-rpc');\nconst path = require('path');\nconst kiritoProto = './protocol/test.kirito';\nconst server = new pRPC.Server();\nconst proto = pRPC.load(path.join(__dirname, kiritoProto));\n\nfunction test(call, cb) {\n  cb(null, {age: call.age, name: call.name});\n}\n\nserver.addKiritoService(proto.testService, {ping: test});\n\nserver.listen(10003);\n```\n\n#### Client\n``` js\n'use strict';\n\nconst pRPC = require('polix-rpc');\nconst path = require('path');\nconst kiritoProto = './protocol/test.kirito';\nconst proto = pRPC.load(path.join(__dirname, kiritoProto));\nconst client =  new pRPC.Client({host: 'localhost', port: 10003}, proto.testService);\n\nclient.ping({age: 23, name: 'Ricky 泽阳'}, function (err, result) {\n  if (err) {\n    throw new Error(err.message);\n  }\n  console.log(result);\n});\n```\n\n## Author\npolix-rpc © [Ricky 泽阳](https://github.com/rickyes), Released under the MIT License.  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolixjs%2Fpolix-rpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolixjs%2Fpolix-rpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolixjs%2Fpolix-rpc/lists"}