rpma_conn_cfg_new(3)

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

πŸ’– rpma_conn_cfg_new(3) β€” the RPMA Programmer's Manual, but make it cute

okay so bestie, welcome to the RPMA Programmer's Manual ✨ this one's about rpma_conn_cfg_new, and honestly? it's giving fresh start energy πŸ¦‹


🌸 NAME 🌸

rpma_conn_cfg_new β€” create a new connection configuration object πŸ’…


✨ SYNOPSIS ✨

#include <librpma.h>

struct rpma_conn_cfg;
int rpma_conn_cfg_new(struct rpma_conn_cfg **cfg_ptr);

like yes, that's the whole vibe. two lines and a dream πŸŽ€


πŸ’« DESCRIPTION πŸ’«

so rpma_conn_cfg_new() does exactly what it says on the tin: it creates a brand-new connection configuration object and fills it up with the default values. no cap, it comes pre-loaded 🫢

here's what you get straight out the box:

.timeout_ms = 1000
.cq_size = 10
.rcq_size = 0
.sq_size = 10
.rq_size = 10
.shared_comp_channel = false

look at those defaults, they're literally so well-behaved 🧚 rcq_size = 0 is just out here being zero and unbothered, and we respect that πŸ’œ


πŸŽ€ RETURN VALUE πŸŽ€

rpma_conn_cfg_new() returns 0 on success, or a negative error code if it fails 😭

and listen, this part matters: on failure, rpma_conn_cfg_new() does not set the *cfg_ptr value. it just... doesn't. so don't go reading it expecting a little gift in there, bestie πŸ’€

πŸ”₯ ERRORS πŸ”₯

rpma_conn_cfg_new() can fail with the following errors:

  • RPMA_E_INVAL β€” cfg_ptr is NULL πŸ™ˆ
  • RPMA_E_NOMEM β€” out of memory 😭

πŸ¦‹ SEE ALSO πŸ¦‹

go read these next, fr fr, they're the whole squad:


RPMA β€” 01 April 2024 β€” rpma_conn_cfg_new(3)

and that's the whole page, bestie 🫢 go create that config object, you're gonna eat πŸ’…βœ¨ periodt 🌈

πŸ“¦ where this page comes from