rpma_conn_disconnect(3)
π rpma_conn_disconnect β tear the connection down π
okay bestie, welcome to the RPMA Programmer's Manual β¨ this one's rpma_conn_disconnect(3), and no cap, it's the breakup episode of the librpma saga π
π NAME π
rpma_conn_disconnect β tear the connection down
like. literally. that's the whole job. she serves closure π¦
β¨ SYNOPSIS β¨
#include <librpma.h>
struct rpma_conn;
int rpma_conn_disconnect(struct rpma_conn *conn);
so you grab librpma.h, you've got your struct rpma_conn floating around, and you call rpma_conn_disconnect() on it with a pointer to your conn. that's the move π«Ά
πΈ DESCRIPTION πΈ
rpma_conn_disconnect() tears the connection down. that's it. that's the vibe. it's giving "we need to talk" but make it RDMA π
the way it works is, there are two whole moods it can be in:
- It may initiate disconnecting the connection. in that case, the end of disconnecting is signalled by the
RPMA_CONN_CLOSEDevent viarpma_conn_next_event()β so you don't just get closure, you get a notification that closure happened π - It may be called after receiving the
RPMA_CONN_CLOSEDevent. in this case, the disconnection is done whenrpma_conn_disconnect()returns with success. so if you already got the event, the moment this call comes back good, it's over over. periodt π
π RETURN VALUE π
rpma_conn_disconnect() returns 0 on success or a negative error code on failure.
zero = slay, negative = not slay π
π₯ ERRORS π₯
rpma_conn_disconnect() can fail with the following errors, and bestie you will be checking these:
RPMA_E_INVALβconnis NULL π like girl. you passed nothing. there's no connection to tear down. what are we doingRPMA_E_PROVIDERβrdma_disconnect()failed π the underlying provider said no
fr fr, always check the return value. a silent failed disconnect is main character energy in the worst possible way.
π SEE ALSO π
rpma_conn_delete(3)rpma_conn_next_event(3)rpma_conn_req_connect(3)librpma(7)- and the whole site: https://pmem.io/rpma/
RPMA Β· version vibes from the RPMA Programmer's Manual, dated 01 April 2024 β that's the tea, bestie, go disconnect responsibly πβ¨π
π¦ 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