rpma_conn_req_connect(3)

πŸ“¦
version 1.3.0 Β· 3 versions
, in ubuntu noble

✨ 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_ptr is consumed and set to NULL β€” 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_ptr is consumed and set to NULL. 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_ptr or conn_ptr is NULL
  • RPMA_E_INVAL β€” pdata is not NULL whereas pdata->len == 0
  • RPMA_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