Reference

radcli_request_done(3)

Report r's outcome once radcli_ctx_dispatch() has resolved it a pure state query, performing no I/O of its own.

NAME

radcli_request_done - Report r's outcome once radcli_ctx_dispatch() has resolved it a pure state query, performing no I/O of its own.

SYNOPSIS

#include <radcli/>

int radcli_request_done(
    radcli_request  *r
);

DESCRIPTION

Since REQ-NET2-SEND-016/013, r shares ctx's request socket/session with every other concurrently in-flight RADCLI_REQUEST_SENDONLY request, and radcli_ctx_dispatch() is what actually drives it to completion (draining replies, retransmitting, expiring on timeout) this call never performs I/O itself, so polling it any number of times between radcli_ctx_dispatch() calls is free. The terminal result is reported once; the reply then stays readable with radcli_request_code()/_attrs().

PARAMETERS

r

a request radcli_request_perform(r, RADCLI_REQUEST_SENDONLY) returned RADCLI_OK for.

RETURN VALUE

RADCLI_AGAIN if still waiting (call radcli_ctx_get_poll()/ radcli_ctx_dispatch() and try again), RADCLI_OK if a validated reply was received (read it with radcli_request_code()/_attrs(), same as radcli_request_perform()), RADCLI_TIMEOUT if retries are exhausted, or RADCLI_ERROR on failure, if r was never sent with RADCLI_REQUEST_SENDONLY, or if its terminal result was already returned.

SEE ALSO

radcli_aaa(3), radcli_request_attrs(3), radcli_request_code(3), radcli_request_free(3), radcli_request_new(3), radcli_request_perform(3), radcli_request_server(3)