rpma_conn_get_event_fd(3)
rpma_conn_get_event_fd π
okay bestie, welcome to the RPMA Programmer's Manual section 3 page for rpma_conn_get_event_fd β¨ this one is short, sweet, and honestly kinda iconic β it's the lil function that hands you the event file descriptor for your connection so you can actually wait on stuff. lowkey essential. let's get into it π«Ά
β¨ NAME β¨
rpma_conn_get_event_fd β get an event file descriptor of the connection π
πΈ SYNOPSIS πΈ
#include <librpma.h>
struct rpma_conn;
int rpma_conn_get_event_fd(const struct rpma_conn *conn, int *fd);
like yes, that's the whole vibe. two params, one int, no drama π
π DESCRIPTION π
so rpma_conn_get_event_fd() literally just gets an event file descriptor of the connection. that's it. that's the function. no cap π
it's giving "here's your fd, go do poll/epoll/whatever your heart desires" energy. main character utility fr fr.
π₯ RETURN VALUE π₯
the tea β:
- returns
0on success β slay π - returns a negative error code on failure β not slay π
- and listen, this part matters: on failure,
rpma_conn_get_event_fd()does not set the*fdvalue. so don't go reading*fdlike it's valid when you got a negative return, bestie. check that return value first, periodt.
π ERRORS π
rpma_conn_get_event_fd() can fail with the following error:
RPMA_E_INVALβconnorfdisNULLπ«
so if you're passing in aNULLconnor aNULLfd, that's on you, and it's anRPMA_E_INVALsituation. vibe check your pointers before you call, iykyk π
π¦ SEE ALSO π¦
go read these next, bestie, they're all connected (pun fully intended) π:
and that's the whole page, you ate it π this was the RPMA manual, dated 01 April 2024, and yeah β same title on the way out: rpma_conn_get_event_fd(3). go forth and get those event fds, you got this πβ¨π«Ά
π¦ 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