All Projects → button-chen → Buttonrpc_cpp14

button-chen / Buttonrpc_cpp14

几百行代码实现的modern c++ rpc library

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
Evans
Evans: more expressive universal gRPC client
Stars: ✭ 2,710 (+1349.2%)
Mutual labels:  rpc
Doe
自己编写dubbo客户端实现rpc调用,在线调试dubbo接口、dubbo接口可视化测试、自动化测试工具。
Stars: ✭ 183 (-2.14%)
Mutual labels:  rpc
Dop
JavaScript implementation for Distributed Object Protocol
Stars: ✭ 163 (-12.83%)
Mutual labels:  rpc
Kraps Rpc
A RPC framework leveraging Spark RPC module
Stars: ✭ 175 (-6.42%)
Mutual labels:  rpc
Nanorpc
nanorpc - lightweight RPC in pure C++ 17
Stars: ✭ 177 (-5.35%)
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
Deepr
A specification for invoking remote methods, deeply!
Stars: ✭ 181 (-3.21%)
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
Brpc Rs
Apache bRPC library for Rust
Stars: ✭ 159 (-14.97%)
Mutual labels:  rpc
Ipcinvoker
A IPC Invoker for Android Development.
Stars: ✭ 176 (-5.88%)
Mutual labels:  rpc
Magiconion
Unified Realtime/API framework for .NET platform and Unity.
Stars: ✭ 2,505 (+1239.57%)
Mutual labels:  rpc
Go Os
Stars: ✭ 185 (-1.07%)
Mutual labels:  rpc
Elixir Thrift
A Pure Elixir Thrift Implementation
Stars: ✭ 182 (-2.67%)
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].