{"id":18290610,"url":"https://github.com/shuai132/protolib","last_synced_at":"2025-09-11T16:47:50.909Z","repository":{"id":124282855,"uuid":"200342505","full_name":"shuai132/protolib","owner":"shuai132","description":"a simple RPC library for C++ based on Protobuf","archived":false,"fork":false,"pushed_at":"2020-03-20T07:43:20.000Z","size":75,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-15T01:44:01.686Z","etag":null,"topics":["protobuf","rpc"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shuai132.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-08-03T06:48:22.000Z","updated_at":"2023-03-26T14:55:21.000Z","dependencies_parsed_at":"2024-06-06T14:15:34.812Z","dependency_job_id":null,"html_url":"https://github.com/shuai132/protolib","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/shuai132%2Fprotolib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuai132%2Fprotolib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuai132%2Fprotolib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuai132%2Fprotolib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shuai132","download_url":"https://codeload.github.com/shuai132/protolib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247997812,"owners_count":21030685,"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":["protobuf","rpc"],"created_at":"2024-11-05T14:11:38.077Z","updated_at":"2025-04-09T07:28:59.992Z","avatar_url":"https://github.com/shuai132.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# protolib\n\n[![Build Status](https://github.com/shuai132/protolib/workflows/build/badge.svg)](https://github.com/shuai132/protolib/actions?workflow=build)\n\na simple RPC library for C++ based on Protobuf.\n\n简单的C++ RPC库，基于Protobuf。\n\n## Requirements\n* C++11\n* CMake 3.1\n* Protobuf 3.9.0 (already included)\n\n## 介绍\n完善的RPC框架(如gRPC)的使用还是有一定复杂性和学习成本的。\n在一些不需要复杂功能项目上，大多数只需要一个消息解析功能，尤其是嵌入式软件项目的方案。\n\n## 功能和特点\n* 实现了消息的订阅和发送。内部自动对消息进行封装、解析和分发。\n* 提供了简单的调用方式，只需使用protobuf定义消息即可。\n* 简单高效，数据零拷贝，可用于大数据量的传输。\n* 可自定义连接层实现，支持多种连接方式。\n\n## 使用方法\n几个概念：\n* [Connection](core/Connection.h): 消息连接 消息收发的接口\n* [MsgManager](core/MsgManager.h): 消息管理 用于注册和发送消息\n\n使用例子：\n* [example/protolib_example.cpp](example/protolib_example.cpp)\n\n## 消息格式/协议\n消息格式基于Protobuf3，Msg类型供消息收发，基础结构如下：\n```\nmessage Msg {\n    uint32 seq = 1; // 消息id 用于匹配消息响应\n    Type type = 2;  // 消息类型 请求/响应\n    Any data = 3;   // 消息数据\n}\n```\n[完整协议](proto/Msg.proto)\n\n本库即为上述协议的C++实现，并提供一些特性以方便使用。其他语言可参考实现。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuai132%2Fprotolib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshuai132%2Fprotolib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuai132%2Fprotolib/lists"}