kv_config_set_timeouts()

#include <kvstore.h>

kv_error_t 
kv_config_set_timeouts(kv_config_t *config, 
                   kv_long_t socket_read_timeout,
                   kv_long_t request_timeout,
                   kv_long_t socket_open_timeout); 

Configures default timeout values that are used for when this client performs store data access. All timeout values are specified in milliseconds.

Parameters

  • config

    The config parameter points to the configuration structure for which you want to set request timeouts. This structure was initially created using kv_create_config().

  • socket_read_timeout

    The socket_read_timeout parameter configures the read timeout associated with sockets used to make client requests. It applies to both read and write requests, and represents the amount of time the client will wait for a response from the store. Shorter timeouts result in more rapid failure detection and recovery. However, this timeout should be sufficiently long so as to allow for the longest timeout associated with a request.

  • request_timeout

    The request_timeout parameter configures the default request timeout. That is, client read and write requests must fully complete within the period of time identified on this parameter, or the request fails with an error.

  • socket_open_timeout

    The socket_open_timeout parameter configures the amount of time the client will wait when opening a socket to the store. Shorter timeouts result in more rapid failure detection and recovery.