---
name: "rpma_conn_cfg_set_timeout"
section: "3"
platform: "linux"
package: "librpma-dev"
version: "1.3.0-2+b3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rpma_conn_cfg_set_timeout"
---

# rpma\_conn\_cfg\_set\_timeout(3)

set connection establishment timeout

## NAME

**rpma\_conn\_cfg\_set\_timeout** - set connection establishment timeout

## SYNOPSIS

```
      #include <librpma.h>
      struct rpma_conn_cfg;
      int rpma_conn_cfg_set_timeout(struct rpma_conn_cfg *cfg, int timeout_ms);
```

## DESCRIPTION

**rpma\_conn\_cfg\_set\_timeout**() sets the connection establishment timeout. If this function is not called, the timeout has the default value (1000) set by [**rpma\_conn\_cfg\_new**(3)](/rpma_conn_cfg_new/3.md).

## RETURN VALUE

The **rpma\_conn\_cfg\_set\_timeout**() function returns 0 on success or a negative error code on failure.

## ERRORS

**rpma\_conn\_cfg\_set\_timeout**() can fail with the following error:

- •

  RPMA\_E\_INVAL - cfg is NULL or timeout\_ms \< 0

## SEE ALSO

[**rpma\_conn\_cfg\_new**(3)](/rpma_conn_cfg_new/3.md), [**rpma\_conn\_cfg\_get\_timeout**(3)](/rpma_conn_cfg_get_timeout/3.md), [**librpma**(7)](/librpma/7.md) and https://pmem.io/rpma/
