mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
* grpc callbackService support added Signed-off-by: shankeleven <shashanksati11@gmail.com> * tests: regenerate C++ gRPC golden with --grpc-callback-api (CallbackService & async_ reactor APIs); update formatting and method placement --------- Signed-off-by: shankeleven <shashanksati11@gmail.com> Co-authored-by: Wouter van Oortmerssen <aardappel@gmail.com>
23 lines
663 B
C++
23 lines
663 B
C++
#include "monster_test.grpc.fb.h"
|
|
|
|
// This test only verifies that the generated CallbackService compiles when the
|
|
// callback API is available. It does not run any RPCs.
|
|
|
|
#if defined(FLATBUFFERS_GENERATED_GRPC_CALLBACK_API) && \
|
|
defined(GRPC_CALLBACK_API_NONEXPERIMENTAL)
|
|
class CallbackServiceImpl
|
|
: public MyGame::Example::MonsterStorage::CallbackService {
|
|
public:
|
|
// For brevity we don't override methods; user code will provide reactors.
|
|
};
|
|
#endif
|
|
|
|
int main() {
|
|
#if defined(FLATBUFFERS_GENERATED_GRPC_CALLBACK_API) && \
|
|
defined(GRPC_CALLBACK_API_NONEXPERIMENTAL)
|
|
CallbackServiceImpl svc;
|
|
(void)svc; // suppress unused
|
|
#endif
|
|
return 0;
|
|
}
|