OpenHiva::ServiceClient类型定义
OpenHiva::ServiceClient用作Server-Client的客户端,向服务端发送请求消息,并等待服务端处理结果。
OpenHiva::ServiceClient由OpenHiva::Node::CreateClient接口创建,该接口返回的OpenHiva::ServiceClient对象已完成初始化。
1 2 3 4 5 6 7 8 | namespace OpenHiva { class ServiceClient { public: template <typename ReqType, typename ResType> uint32_t InvokeService(ReqType req, ResType &res, const uint32_t timeout = 5000U); // 向Server发布ReqType类型的消息并等待ResType类型的消息返回 void Destroy(); // 释放ServiceClient申请的资源 }; } |
父主题: 类型定义