OpenHiva::Node::CreateServer
Prototype |
template <typename ReqType, typename ResType> std::shared_ptr<OpenHiva::ServiceServer> CreateServer(const std::string &serviceName, const OpenHiva::ServiceOptions &serviceOptions, const std::function<bool(ReqType, ResType)> &serviceCallback) |
|
|---|---|---|
Description |
Creates a server for Service. |
|
Parameter (IN) |
serviceName |
Service name. |
serviceOptions |
Service attribute configuration. For details, see OpenHiva::ServiceOptions. |
|
serviceCallback |
Callback function invoked by Server to process messages published by Client. |
|
Parameter (OUT) |
None |
|
Return |
std::shared_ptr<OpenHiva::ServiceServer> |
The OpenHiva::ServiceServer object is returned. This object can be used to initialize the server and release resources. |
Usage |
None |
|
Precautions |
|
|
Parent topic: OpenHiva::Node