Library Version 12.1.6.0

DbChannel::set_timeout()
Prev | Chapter 11. Replication Methods | Next

## DbChannel::set_timeout()

    #include <db_cxx.h>

    int
    DbChannel::set_timeout(db_timeout_t timeout);

The `DbChannel::set_timeout()` method sets the default timeout value for the DbChannel handle. This timeout is used by the DbChannel::send_request() method.

The `DbChannel::set_timeout()` method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success.

### Parameters

#### timeout

Configures the amount of time that may elapse while the DbChannel::send_request() method waits for a message response. The timeout value must be specified as an unsigned 32-bit number of microseconds, limiting the maximum timeout to roughly 71 minutes.

### Errors

The `DbChannel::set_timeout()` method may fail and throw a DbException exception, encapsulating one of the following non-zero errors, or return one of the following non-zero errors:

#### EINVAL

If this method is called from a Base API application, or if an invalid flag value or parameter was specified.

### Class

DbEnv, DbChannel

### See Also

Replication and Related Methods

Prev | Up | Next
DbChannel::send_request() | Home | DbSite::get_config()