RpcService.h 395 B

12345678910111213141516171819202122232425
  1. #ifndef NET_RPC_SERVICE_H
  2. #define NET_RPC_SERVICE_H
  3. #include <google/protobuf/service.h>
  4. namespace Hainan {
  5. class RpcService
  6. {
  7. private:
  8. typedef boost::unordered_map<std::string, RpcHandlerPtr> RpcServiceMap;
  9. RpcServiceMap services;
  10. public:
  11. RpcServer(google::protobuf::Service* service);
  12. ~RpcServer();
  13. void Start();
  14. void Stop();
  15. };
  16. } // namespace Hainan
  17. #endif // NET_RPC_SERVICE_H