RPMA_CONN_CFG_SET_TIMEOUT(3)

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

πŸ’– rpma_conn_cfg_set_timeout β€” set connection establishment timeout πŸ’–

okay bestie, welcome to the RPMA Programmer's Manual 🫢 this is the page for rpma_conn_cfg_set_timeout(3) and it's genuinely such a lil cutie. it does one (1) thing and it does it well. no cap.


✨ SYNOPSIS ✨

#include <librpma.h>

struct rpma_conn_cfg;
int rpma_conn_cfg_set_timeout(struct rpma_conn_cfg *cfg, int timeout_ms);

like yes, that's the whole thing. short king behavior πŸ‘‘


🌸 DESCRIPTION 🌸

so rpma_conn_cfg_set_timeout() sets the connection establishment timeout. that's it, that's the job, and honestly? she's thriving πŸ’…

the way this works is: you hand her a cfg and a timeout_ms, and she writes that timeout into your config so future-you knows how long to wait around for a connection to show up before giving up on it.

⚠️ real talk tho: if you never call this function, the timeout just has the default value of 1000 β€” and that default was set for you by rpma_conn_cfg_new(3). so if you're sitting there like "wait why is it 1000??" β€” bestie, it's because you didn't call this. mystery solved πŸ”βœ¨

🌈 RETURN VALUE 🌈

  • 0 β€” slay! success, we ate, no crumbs πŸŽ€
  • negative error code β€” uh oh, something went wrong (see below, she's dramatic but she's fine)

πŸ’€ ERRORS πŸ’€

rpma_conn_cfg_set_timeout() can fail with the following error:

  • RPMA_E_INVAL β€” cfg is NULL or timeout_ms < 0. yeahhh so you either passed her nothing at all, or you tried to give her a negative timeout and she was like "girl. no. 🚫" β€” negative time is not a vibe, not even a little bit, not even a tiny amount. time moves forward only. periodt.

πŸ”₯ SEE ALSO πŸ”₯


πŸ¦‹ cute sign-off πŸ¦‹

this page lives in the RPMA manual and it's dated 01 April 2024 πŸ’œ so yeah, that's the whole thing β€” go set your timeouts, be responsible, and remember: NULL is not a personality trait, bestie. bye!! πŸŽ€βœ¨πŸ§šπŸ’–

πŸ“¦ where this page comes from