QB_IPCS_CO...TATS_GET_2(3)
π qb_ipcs_connection_stats_get_2 β bestie's guide to snatching connection stats π
okay so this one lives in the libqb Programmer's Manual, section 3, and it's giving "I just want my stats and I want them NOW" energy. sit down, grab a boba, we're doing this π§β¨
β¨ NAME β¨
qb_ipcs_connection_stats_get_2 β get (and allocate) the connection statistics. yes, and allocate. she's not just fetching, she's also out here making you a whole new struct. girlboss behaviour honestly π
β¨ SYNOPSIS β¨
#include <qb/qbipcs.h>
struct qb_ipcs_connection_stats_2 * qb_ipcs_connection_stats_get_2(
qb_ipcs_connection_t *c, /* connection instance */
int32_t clear_after_read /* clear stats after copying them into stats */
);
so you pass in your connection, you tell her whether to wipe the stats after she copies them, and she hands you back a freshly allocated struct. the way that she allocates it FOR you π«Ά
β¨ PARAMS β¨
cβ connection instance. the actual connection you're being nosy about. no connection, no stats, that's the vibe check πΈclear_after_readβ clear stats after copying them into stats. so like, do you want a snapshot or do you want a reset button? set this and she wipes the counters clean after she copies them out. lowkey iconic for "give me the delta since last time" situations π
β¨ DESCRIPTION β¨
ngl bestie... this section is empty in the original. like, fully blank. the manpage said "DESCRIPTION" and then just... said nothing. no cap. the name, the params and the return value are doing all the talking here π
β¨ RETURN VALUE β¨
NULLβ if there's no memory, or if your connection is invalid. sad girl hours π- allocated statistics structure β and heads up, queen: you have to free it. user must free it. it's yours now, you're responsible for it, that's the whole deal π
β οΈ fr fr, do NOT forget to free the returned struct. she allocated it, she's not cleaning up after you. that's your mess bestie π
β¨ SEE ALSO β¨
the whole friend group, obviously π¦
qb_ipcs_response_send(3)qb_ipcs_ref(3)qb_ipcs_unref(3)qb_ipcs_connection_auth_set(3)qb_ipcs_service_context_get(3)qb_ipcs_connection_ref(3)qb_ipcs_connection_next_get(3)qb_ipcs_stats_get(3)qb_ipcs_connection_unref(3)qb_ipcs_context_set(3)qb_ipcs_poll_handlers_set(3)qb_ipcs_request_rate_limit(3)qb_ipcs_disconnect(3)qb_ipcs_connection_first_get(3)qb_ipcs_enforce_buffer_size(3)qb_ipcs_destroy(3)qb_ipcs_event_send(3)qb_ipcs_service_context_set(3)qb_ipcs_connection_stats_get(3)qb_ipcs_service_id_get(3)qb_ipcs_context_get(3)qb_ipcs_connection_get_buffer_size(3)qb_ipcs_create(3)qb_ipcs_run(3)qb_ipcs_event_sendv(3)qb_ipcs_connection_service_context_get(3)qb_ipcs_response_sendv(3)
β¨ COPYRIGHT β¨
Copyright (C) 2010-2020 Red Hat, Inc.
and that's the tea π stay safe, free your structs, and remember: libqb, dated 2025-09-16 β she ate and left no crumbs ππ byeeee π¦β¨
π¦ where this page comes from
- fedora 44: libqb-devel 2.0.9-2.fc44 Β· LGPL-2.1-or-later
- fedora 44: libqb-devel 2.0.9-2.fc44 Β· LGPL-2.1-or-later
- ubuntu resolute: libqb-dev 2.0.9-1ubuntu1 Β· LGPL-2.1-or-later
- ubuntu stonking: libqb-dev 2.0.9-1ubuntu1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms