-
Notifications
You must be signed in to change notification settings - Fork 6
Quickstart
Greg "GothAck" Miell edited this page Mar 15, 2020
·
3 revisions
aka my ADD makes writing anything more in depth somewhat difficult.
- Install flatc from Flatbuffers
-
git clone
this repo make all
sudo make install
No really, I don't prescribe cmake, make, or anything, just know how to call flatc
and flatrpcc
.
-
Pay special attention to "RPC interface declarations" in the latter document, this project will transform these into your services and calls.
-
flatc --cpp --gen-mutable --gen-name-strings --gen-object-api --gen-compare --reflect-names --cpp-ptr-type std::shared_ptr --cpp-std c++17 $FILENAME
Note that shared_ptr as ptr-type is kinda required at the moment, this may go away later on, I prefer it, but I understand not everyone will; object API is required, again this may be optional in the future once I get flatter server side calls working. flatbufcc $FILENAME
- See
examples/simple/greeter_server.{hpp,cpp}
for an example on how to use the generated server stubs and implement your methods. - You can use the client as is, or you can subclass it to add further functionality, it's up to you.