rpma_conn_req_connect(3)
β¨ rpma_conn_req_connect β¨ β the librpma era begins π
okay bestie, so this one is rpma_conn_req_connect(3), straight out of the RPMA Programmer's Manual. it's the glow-up moment where a connection request stops being a request and becomes a whole actual connection. no cap. π¦
πΈ NAME πΈ
rpma_conn_req_connect β initiate processing the connection request
π SYNOPSIS π
#include <librpma.h>
struct rpma_conn_req;
struct rpma_conn_private_data;
struct rpma_conn;
int rpma_conn_req_connect(struct rpma_conn_req **req_ptr,
const struct rpma_conn_private_data *pdata, struct rpma_conn **conn_ptr);
π DESCRIPTION π
so like, rpma_conn_req_connect() initiates processing the connection requests β both incoming and outgoing, she does it all, main character energy fr fr. π
and how do you know when the processing is done? the RPMA_CONN_ESTABLISHED event tells you, delivered through rpma_conn_next_event(). that's your signal, that's your moment, that's the group chat notification you've been waiting for. β¨
π RETURN VALUE π
rpma_conn_req_connect() returns 0 on success or a negative error code on failure. periodt.
- on success: the newly created connection object gets stored in
*conn_ptr, while*req_ptris consumed and set toNULLβ she ate that request up, it's gone now, she's built different π - on failure:
rpma_conn_req_connect()does not set*conn_ptr, while*req_ptris consumed and set toNULL. yeah. the request is still gone either way. it's giving "consumed regardless" ngl π
π ERRORS π
rpma_conn_req_connect() can fail with the following errors:
RPMA_E_INVALβreq_ptr,*req_ptrorconn_ptrisNULLRPMA_E_INVALβpdatais notNULLwhereaspdata->len == 0RPMA_E_NOMEMβ out of memory (the classic π)RPMA_E_PROVIDERβ initiating a connection request failed (active side only)RPMA_E_PROVIDERβ accepting the connection request failed (passive side only)RPMA_E_PROVIDERβ freeing a communication event failed (passive side only)
bestie pls note: those last three all wear the same RPMA_E_PROVIDER badge but they are three different situations, and two of them are passive-side-only. don't get it twisted. π
π SEE ALSO π
rpma_conn_apply_remote_peer_cfg(3), rpma_conn_delete(3), rpma_conn_disconnect(3), rpma_conn_get_cq(3), rpma_conn_get_event_fd(3), rpma_conn_get_private_data(3), rpma_conn_get_rcq(3), rpma_conn_next_event(3), rpma_conn_req_new(3), rpma_ep_next_conn_req(3), rpma_flush(3), rpma_read(3), rpma_recv(3), rpma_send(3), rpma_write(3), rpma_atomic_write(3), librpma(7) and https://pmem.io/rpma/
go read them all, i'll wait, it's a whole cinematic universe π«Ά
and that's the tea, bestie π this page is from the RPMA source, dated 01 April 2024, and it's page rpma_conn_req_connect(3) in the RPMA Programmer's Manual. now go initiate something iconic β¨ππ§
π¦ where this page comes from
- ubuntu noble: librpma-dev 1.3.0-2build2 Β· BSD-3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms