libssh2\_keepalive\_send(3) libssh2 libssh2\_keepalive\_send(3)

# [NAME](#NAME)

libssh2\_keepalive\_send - short function description

# [SYNOPSIS](#SYNOPSIS)

```
#include <libssh2.h>
int
libssh2_keepalive_send(LIBSSH2_SESSION *session,


                       int *seconds_to_next);
```

# [DESCRIPTION](#DESCRIPTION)

Send a keepalive message if needed. **seconds\_to\_next** indicates how many seconds you can sleep after this call before you need to call it again.

# [RETURN VALUE](#RETURN_VALUE)

Returns 0 on success, or LIBSSH2\_ERROR\_SOCKET\_SEND on I/O errors.

# [AVAILABILITY](#AVAILABILITY)

Added in libssh2 1.2.5

# [SEE ALSO](#SEE_ALSO)

[**libssh2\_keepalive\_config(3)**](/man/os/libssh2/libssh2_keepalive_config.3)

13 Apr 2011 libssh2

---

Document: libssh2_keepalive_send(3) from libssh2 1.11.1-r11 (Chainguard OS)
Source: https://github.com/libssh2/libssh2.git
