OpenHiva::Node::CreateClient
Description
Creates a client for Service.
Prototype
template <typename ReqType, typename ResType> std::shared_ptr<OpenHiva::ServiceClient> CreateClient(const std::string &serviceName, const ServiceOptions &serviceOptions)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
serviceName |
Input |
Service name. |
serviceOptions |
Input |
Service attribute configuration. For details, see OpenHiva::ServiceOptions. |
Returns
The OpenHiva::ServiceClient object is returned. This object can be used to initialize a client and release resources, or send messages to a server and obtain the response from the server.
Usage
None
Precautions
- Non-reentrant, synchronous interface.
- The request message type described by ReqType must be a subclass of HivaMessage.
- The response message type described by ResType must be a subclass of HivaMessage.
Parent topic: OpenHiva::Node