.\" Extracted by src2man from /build/rpma-U2S8XW/rpma-0.10.0/src/include/librpma.h .\" Text automatically generated by txt2man .TH rpma_conn_get_completion_fd 3 "26 January 2022" "RPMA" "RPMA Programmer's Manual" .SH NAME \fBrpma_conn_get_completion_fd \fP- get the completion file descriptor (deprecated) .SH SYNOPSIS .nf .fam C #include struct rpma_conn; int \fBrpma_conn_get_completion_fd\fP(const struct rpma_conn *conn, int *fd); .fam T .fi .fam T .fi .SH DESCRIPTION \fBrpma_conn_get_completion_fd\fP() gets the completion file descriptor of the connection. It is the same file descriptor as the one returned by the \fBrpma_cq_get_fd\fP(3) for the connection's main CQ available via \fBrpma_conn_get_cq\fP(3). .SH RETURN VALUE The \fBrpma_conn_get_completion_fd\fP() function returns 0 on success or a negative error code on failure. \fBrpma_conn_get_completion_fd\fP() does not set *fd value on failure. .SH ERRORS \fBrpma_conn_get_completion_fd\fP() can fail with the following error: .IP \(bu 3 RPMA_E_INVAL - conn or fd is NULL .SH DEPRECATED Please use \fBrpma_conn_get_cq\fP(3) and \fBrpma_cq_get_fd\fP(3) instead. This is an example snippet of code using the old API: .PP .nf .fam C int ret; int fd; ret = rpma_conn_get_completion_fd(conn, &fd); if (ret) { error_handling_code() } ret = rpma_conn_completion_wait(conn); if (ret) { error_handling_code() } struct rpma_completion cmpl; ret = rpma_conn_completion_get(conn, &cmpl); if (ret) { error_handling_code() } .fam T .fi The above snippet should be replaced with the following one using the new API: .PP .nf .fam C rpma_cq *cq; if (rpma_conn_get_cq(conn, &cq)) { error_handling_code() } ret = rpma_cq_get_fd(cq, &fd); if (ret) { error_handling_code() } ret = rpma_cq_wait(cq); if (ret) { error_handling_code() } struct rpma_completion cmpl; ret = rpma_cq_get_completion(cq, &cmpl); if (ret) { error_handling_code() } .fam T .fi .SH SEE ALSO \fBrpma_conn_completion_get\fP(3), \fBrpma_conn_completion_wait\fP(3), \fBrpma_conn_req_connect\fP(3), \fBlibrpma\fP(7) and https://pmem.io/rpma/