rpma_conn_next_event(3)

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

✨ rpma_conn_next_event ✨

okay so bestie, welcome to rpma_conn_next_event(3) β€” that's section 3 of the RPMA Programmer's Manual, and yes we're reading a manpage together, it's giving study date energy πŸ’–


🌸 NAME 🌸

rpma_conn_next_event β€” obtain a connection status πŸ‘€

like… you wanna know what your connection is doing? this is the girl for the job.


πŸŽ€ SYNOPSIS πŸŽ€

#include <librpma.h>

struct rpma_conn;
enum rpma_conn_event {
        RPMA_CONN_UNDEFINED = -1,
        RPMA_CONN_ESTABLISHED,
        RPMA_CONN_CLOSED,
        RPMA_CONN_LOST,
        RPMA_CONN_REJECTED,
        RPMA_CONN_UNREACHABLE
};

int rpma_conn_next_event(struct rpma_conn *conn,
                enum rpma_conn_event *event);

no cap, that's the whole vibe right there πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

rpma_conn_next_event() obtains the next event from the connection. literally just the next one, bestie β€” one at a time, main character pacing, we love that for us ✨

Types of events:

  • RPMA_CONN_UNDEFINED β€” undefined connection event πŸ™ˆ (it's giving mystery, but not in a cute way)
  • RPMA_CONN_ESTABLISHED β€” connection established πŸ‘‘ the slay era begins
  • RPMA_CONN_CLOSED β€” connection closed πŸŽ€ a peaceful goodbye
  • RPMA_CONN_LOST β€” connection lost 😭 where did she GO
  • RPMA_CONN_REJECTED β€” connection rejected πŸ’€ oof
  • RPMA_CONN_UNREACHABLE β€” connection unreachable πŸ¦‹ can't get there from here, bestie

⭐ RETURN VALUE ⭐

The rpma_conn_next_event() function returns 0 on success or a negative error code on failure.

so 0 = we ate πŸ”₯, negative = we did NOT eat 😭


πŸ’… ERRORS πŸ’…

rpma_conn_next_event() can fail with the following errors:

  • RPMA_E_INVAL β€” conn or event is NULL 🚩
  • RPMA_E_UNKNOWN β€” unexpected event πŸ‘€ plot twist nobody asked for
  • RPMA_E_PROVIDER β€” rdma_get_cm_event() or rdma_ack_cm_event() failed πŸ’€ not our fault, the provider did it
  • RPMA_E_NOMEM β€” out of memory 😭 brain empty

🌈 SEE ALSO 🌈

iykyk β€” go read those next, bestie, the lore is deep 🫢


RPMA Β· version vibes from 01 April 2024 Β· rpma_conn_next_event(3) β€” and that's the whole page, periodt πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from