Skip to content
This repository has been archived by the owner on Apr 21, 2019. It is now read-only.
/ buffc Public archive

A simple and practical protocol buffer & RPC library.

Notifications You must be signed in to change notification settings

eimslab/buffc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 

Repository files navigation

A simple and practical protocol buffer & RPC library.

At present, it has only dlang and C++ implementations, and will add more language support in the future, such as: Lua, Java, python, ruby, golang, rust...

dlang project on github: https://github.com/shove70/buffer

this project dependencies: https://github.com/shove70/crypt (C++)

! This project has been included in the shove.c project, and subsequent updates will only be included in the shove.c project: https://github.com/shove70/shove.c

Quick Start:

    Sample sample;
    sample.id = 1;
    sample.name = "abcde";
    sample.age = 10;

    vector<ubyte> serialized;
    sample.serialize(serialized);

    Sample sample2 = Message::deserialize<Sample>(serialized.data(), serialized.size());
    cout << sample2.id << ", " << sample2.name << ", " << sample2.age << endl;

    //////////////////////

    Client::bindTcpRequestHandler(&tcpRequestHandler);
    int r = Client::call<int>("Login", 101, "abcde");
    cout << r << endl;

    Sample sample3 = Client::call<Sample>("Login", 1, "abcde", 10);
    cout << sample3.id << ", " << sample3.name << ", " << sample3.age << endl;
    

About

A simple and practical protocol buffer & RPC library.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published