---
name: "sam_hc_send"
section: "3"
platform: "linux"
package: "libsam-dev"
version: "3.1.9-2+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/sam_hc_send"
---

# sam\_hc\_send(3)

Send health check confirmation

## NAME

sam\_hc\_send - Send health check confirmation

## SYNOPSIS

**#include \<corosync/sam.h\>**

**cs\_error\_t sam\_hc\_send (void);**

## DESCRIPTION

The **sam\_hc\_send** function is used to send healthcheck confirmation from the application.  This function should be called regularly when configured for application driven healthchecking, otherwise recovery action will be taken.

When using event driven healthchecking, this function should not be used.

## RETURN VALUE

This call return CS\_OK value if successful, otherwise and error is returned.

## ERRORS

- CS\_ERR\_BAD\_HANDLE

  health checking is not in running state (**[sam\_start(3)](/sam_start/3.md)** has not been executed) or function is called after stop/finalization of SAM.

## SEE ALSO

[**sam\_start**(3)](/sam_start/3.md), [**sam\_stop**(3)](/sam_stop/3.md), [**sam\_hc\_callback\_register**(3)](/sam_hc_callback_register/3.md)

**CS\_ERR\_TRY\_AGAIN** Resource temporarily unavailable

**CS\_ERR\_INVALID\_PARAM** Invalid argument

**CS\_ERR\_ACCESS** Permission denied

**CS\_ERR\_LIBRARY** The connection failed

**CS\_ERR\_INTERRUPT** System call interrupted by a signal

**CS\_ERR\_NOT\_SUPPORTED** The requested protocol/functionality not supported

**CS\_ERR\_MESSAGE\_ERROR** Incorrect auth message received

**CS\_ERR\_NO\_MEMORY** Not enough memory to complete the requested task
