Orbit Framework
An ultra-modern, asynchronous, cross-platform C++ Web Framework.
Loading...
Searching...
No Matches
GrpcServer.hpp
Go to the documentation of this file.
1#pragma once
2#include <memory>
3#include <string>
4#include <vector>
5
6namespace grpc {
7 class Server;
8 class Service;
9}
10
11namespace server {
12
14public:
15 GrpcServer();
17
18 void add_service(grpc::Service* service);
19 void start(const std::string& address);
20 void stop();
21
22private:
23#ifdef ORBIT_ENABLE_GRPC
24 std::unique_ptr<grpc::Server> server_;
25 std::vector<grpc::Service*> services_;
26#endif
27};
28
29} // namespace server
Definition GrpcServer.hpp:13
void stop()
Definition GrpcServer.cpp:44
void add_service(grpc::Service *service)
Definition GrpcServer.cpp:42
void start(const std::string &address)
Definition GrpcServer.cpp:43
GrpcServer()
Definition GrpcServer.cpp:40
~GrpcServer()
Definition GrpcServer.cpp:41
Definition GrpcServer.hpp:6
Definition Http2Session.hpp:17