The heartbeat daemon has no notion for 'service'. Only the clients registered with the heartbeat daemons for the same service, have the notion for that service. 'service' mostly is a mechanism of providing primitive group services to a set of non-casual clients registered for that service.
Also there is a bug in this function. It does not validate the 'cinfo' parameter'. It should return HA_FAIL on failure.
If blocking is set, then it waits till a message arrives. But it returns true only if that message does not have a callback registered.
If 'blocking' is set to FALSE, it will not wait for a message to arrive. It returns NULL if there is not currently a message ready to read which is not intercepted by a callback function.
The modes have the following meanings: