.\" Extracted by src2man from include/librpma.h
.\" Text automatically generated by txt2man
.TH rpma_send_with_imm 3 "29 October 2024" "RPMA" "RPMA Programmer's Manual"
.SH NAME
\fBrpma_send_with_imm \fP- initiate the send operation with immediate data
.SH SYNOPSIS
.nf
.fam C
      #include <librpma.h>

      struct rpma_conn;
      struct rpma_mr_local;
      int \fBrpma_send_with_imm\fP(struct rpma_conn *conn, const struct rpma_mr_local *src,
                      size_t offset, size_t len, int flags, uint32_t imm,
                      const void *op_context);

.fam T
.fi
.fam T
.fi
.SH DESCRIPTION
\fBrpma_send_with_imm\fP() initiates the send operation with immediate data which transfers a message
from the local memory to other side of the connection. To send a 0 byte message, set src to NULL
and both offset and len to 0.
.PP
The attribute flags set the completion notification indicator:
.IP \(bu 3
RPMA_F_COMPLETION_ON_ERROR - generate the completion on error
.IP \(bu 3
RPMA_F_COMPLETION_ALWAYS - generate the completion regardless of result of the operation.
.PP
op_context is returned in the wr_id field of the completion (struct ibv_wc).
.SH RETURN VALUE
The \fBrpma_send_with_imm\fP() function returns 0 on success or a negative error code on failure.
.SH ERRORS
\fBrpma_send_with_imm\fP() can fail with the following errors:
.IP \(bu 3
RPMA_E_INVAL - conn == NULL || flags == 0
.IP \(bu 3
RPMA_E_INVAL - src == NULL && (offset != 0 || len != 0)
.IP \(bu 3
RPMA_E_PROVIDER - \fBibv_post_send\fP(3) failed
.SH SEE ALSO
\fBrpma_conn_req_connect\fP(3), \fBrpma_mr_reg\fP(3), \fBlibrpma\fP(7) and https://pmem.io/rpma/