OpenHiva::ServiceServer

OpenHiva::ServiceServer functions as the server of the Server-Client to receive messages published by the client, process the messages, and return the messages to the client.

OpenHiva::ServiceServer is created by invoking OpenHiva::Node::CreateServer, which returns an initialized OpenHiva::ServiceServer object.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
namespace OpenHiva {
class ServiceServer {
public:
    uint32_t Enable();  // Enable the service server so that the server can receive messages from the client and return the processing result.
    uint32_t Disable(); // Disable the service server. In this case, the server does not receive messages from the client.
    void Destroy();     // Release the resources that the ServiceServer applies for.
private:
    std::shared_ptr<Hiva::ServiceServer> coreServerPtr_;
    friend class Node;
};
}