Timeouts

There are several timeouts which are used throughout libnetconf2 to assure that it will never indefinitely hang on any operation. Normally, you should not need to worry about them much necause they are set by default to reasonable values for common systems. However, if your platform is not common (embedded, ...), adjusting these timeouts may save a lot of debugging and time.

## Compile Options

You can adjust active and inactive read timeout using `cmake` variables. For details look into `README.md`.

## API Functions

Once a new connection is established including transport protocol negotiations, hello message is exchanged. You can set how long will the server wait for receiving this message from a client before dropping it.

Having a NETCONF session working, it may not communicate for a longer time. To free up some resources, it is possible to adjust the maximum idle period of a session before it is disconnected. In Call Home, for both a persistent and periodic connection can this idle timeout be specified separately for each client using corresponding functions.

Lastly, SSH user authentication timeout can be also modified. It is the time a client has to successfully authenticate after connecting before it is disconnected.

## Functions List

Available in nc_server.h.

- nc_server_set_hello_timeout()
- nc_server_get_hello_timeout()
- nc_server_set_idle_timeout()
- nc_server_get_idle_timeout()
- nc_server_ch_client_periodic_set_idle_timeout()
- nc_server_ssh_ch_client_endpt_set_auth_timeout()
- nc_server_ssh_ch_client_endpt_set_auth_timeout()