libssh2\_keepalive\_config(3) libssh2 libssh2\_keepalive\_config(3)

# [NAME](#NAME)

libssh2\_keepalive\_config - short function description

# [SYNOPSIS](#SYNOPSIS)

```
#include <libssh2.h>
void
libssh2_keepalive_config(LIBSSH2_SESSION *session,


                         int want_reply,


                         unsigned int interval);
```

# [DESCRIPTION](#DESCRIPTION)

Set how often keepalive messages should be sent. **want\_reply** indicates whether the keepalive messages should request a response from the server. **interval** is number of seconds that can pass without any I/O, use 0 (the default) to disable keepalives. To avoid some busy-loop corner-cases, if you specify an interval of 1 it will be treated as 2.

Note that non-blocking applications are responsible for sending the keepalive messages using [**libssh2\_keepalive\_send(3)**](/man/os/libssh2/libssh2_keepalive_send.3).

# [RETURN VALUE](#RETURN_VALUE)

Nothing

# [AVAILABILITY](#AVAILABILITY)

Added in libssh2 1.2.5

# [SEE ALSO](#SEE_ALSO)

[**libssh2\_keepalive\_send(3)**](/man/os/libssh2/libssh2_keepalive_send.3)

12 Apr 2011 libssh2

---

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