pbRPCpp is a small C++ RPC library built on top of boost::asio and google's protocol buffer, sponsored by Springbeats, and released under Boost License.
PbRPCpp aims to provide a simple Remote Procedure Call API for C++ programs. It was initially built to simplify client/server communications in desktop applications that were already using protobuf as a payload format.
Because it is built on top of Boost, it is quite portable.
- Boost
- Google Protobuf
- Google Gtest which is already included in protobuf's archive.
Note that the license for all these components allow a commercial usage (please have a look at them for details).
Build system relies on Premake4,
which generates project files for you, depending on the target you choose
(gmake, xcode3, xcode4, vs2008, etc. Type premake4 --help
to see all the
available targets).
For example using gmake:
cd build
premake4 --gtestdir=../../protobuf/gtest --boostdir=../../boost --protobufdir=../../protobuf gmake
make config=debug64
This will build the static lib and unit-tests in the bin/ directory.
// File: echo.proto
package echo;
option cc_generic_services = true;
message EchoRequest
{
required string message = 1;
}
message EchoResponse
{
required string response = 1;
}
service EchoService
{
rpc Echo(EchoRequest) returns (EchoResponse);
}
Compilation with protoc --cpp_out=. echo.proto
generates echo.pb.h/echo.pb.cc files.
TODO
TODO