button-chen / Buttonrpc_cpp14
几百行代码实现的modern c++ rpc library
Stars: ✭ 187
Labels
Projects that are alternatives of or similar to Buttonrpc cpp14
Hprose Php
Hprose is a cross-language RPC. This project is Hprose 3.0 for PHP
Stars: ✭ 1,952 (+943.85%)
Mutual labels: rpc
Dop
JavaScript implementation for Distributed Object Protocol
Stars: ✭ 163 (-12.83%)
Mutual labels: rpc
Netflix Clone
Netflix like full-stack application with SPA client and backend implemented in service oriented architecture
Stars: ✭ 156 (-16.58%)
Mutual labels: rpc
Bigfile
Bigfile -- a file transfer system that supports http, rpc and ftp protocol https://bigfile.site
Stars: ✭ 186 (-0.53%)
Mutual labels: rpc
Fable.remoting
Type-safe communication layer (RPC-style) for F# featuring Fable and .NET Apps
Stars: ✭ 175 (-6.42%)
Mutual labels: rpc
Surgingdemo
surging 使用入门示例。完成一个基本业务的增删改查示例,并运用Surging强大的分布式缓存功能
Stars: ✭ 165 (-11.76%)
Mutual labels: rpc
Discordrpcmaker
Cross-platform Discord Rich Presence Maker, WITH BUTTONS!
Stars: ✭ 165 (-11.76%)
Mutual labels: rpc
Go Grpc Examples
This repo contains examples and implementations of different types of GRPC services and APIs using Golang.
Stars: ✭ 180 (-3.74%)
Mutual labels: rpc
Navi Pbrpc
A protobuf based high performance rpc framework leveraging full-duplexing and asynchronous io with netty
Stars: ✭ 163 (-12.83%)
Mutual labels: rpc
Activej
ActiveJ is an alternative Java platform built from the ground up. ActiveJ redefines web, high load, and cloud programming in Java, featuring ultimate performance and scalability!
Stars: ✭ 183 (-2.14%)
Mutual labels: rpc
Magiconion
Unified Realtime/API framework for .NET platform and Unity.
Stars: ✭ 2,505 (+1239.57%)
Mutual labels: rpc
buttonrpc - modern rpc framework for C++
- ZeroMQ 作为网络层
- 使用c++14开发
Features
- 轻量级,跨平台,简单易用
- 服务端可以绑定自由函数,类成员函数,std::function对象
- 服务端可以绑定参数是任意自定义类型的函数
- 客户端与服务端自动重连机制
- 客户端调用超时选项
Example
server:
#include "buttonrpc.hpp"
int foo(int age, int mm){
return age + mm;
}
int main()
{
buttonrpc server;
server.as_server(5555);
server.bind("foo", foo);
server.run();
return 0;
}
client:
#include <iostream>
#include "buttonrpc.hpp"
int main()
{
buttonrpc client;
client.as_client("127.0.0.1", 5555);
int a = client.call<int>("foo", 2, 3).val();
std::cout << "call foo result: " << a << std::endl;
system("pause");
return 0;
}
// output: call foo result: 5
Dependences
Building
- windows vs2015 或者更高版本, linux 添加编译选项:-std=c++1z
Usage
- 1: 更多例子在目录 example/ 下
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].