---
name: "rpma_conn_get_rcq"
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_get_rcq"
---

# rpma\_conn\_get\_rcq(3)

## NAME

**rpma\_conn\_get\_rcq -- get the connection's receive CQ**

## SYNOPSIS

```
      #include <librpma.h>
      struct rpma_conn;
      struct rpma_cq;
      int rpma_conn_get_rcq(const struct rpma_conn *conn, struct rpma_cq **rcq_ptr);
```

## DESCRIPTION

**rpma\_conn\_get\_rcq() gets the receive CQ from the connection. The receive CQ allows handling all** **[rpma\_recv(3)](/rpma_recv/3.md) completions within the connection. It allows separating [rpma\_recv(3)](/rpma_recv/3.md) completions** **processing path from all other completions. The receive CQ is created only if the receive CQ** **size in the provided connection configuration is greater than 0. When the receive CQ does not** **exist for the given connection the \*rcq\_ptr == NULL.**

## RETURN VALUE

**The rpma\_conn\_get\_rcq() function returns 0 on success or a negative error code on failure.** **rpma\_conn\_get\_rcq() does not set \*rcq\_ptr value on failure.**

## ERRORS

**rpma\_conn\_get\_rcq() can fail with the following error:**

- •

  **RPMA\_E\_INVAL - conn or rcq\_ptr is NULL**

## SEE ALSO

**[rpma\_conn\_cfg\_set\_rcq\_size(3)](/rpma_conn_cfg_set_rcq_size/3.md), [rpma\_conn\_req\_connect(3)](/rpma_conn_req_connect/3.md), [rpma\_conn\_get\_cq(3)](/rpma_conn_get_cq/3.md), [rpma\_cq\_wait(3)](/rpma_cq_wait/3.md),** **[rpma\_cq\_get\_wc(3)](/rpma_cq_get_wc/3.md), [rpma\_cq\_get\_fd(3)](/rpma_cq_get_fd/3.md), [rpma\_recv(3)](/rpma_recv/3.md), [librpma(7)](/librpma/7.md) and https://pmem.io/rpma/**
