QB_IPCC_SENDV_RECV(3)
π qb_ipcc_sendv_recv β the libqb programmer's manual, but make it make sense π
okay bestie so you're reading the libqb Programmer's Manual and the star of today's episode is qb_ipcc_sendv_recv(3). yes it's a mouthful. no we are not changing it. let's go π¦
β¨ NAME β¨
qb_ipcc_sendv_recv β this is a convenience function that simply sends and then recvs.
that's it. that's the whole vibe. it sends, then it recvs. no cap. π
πΈ SYNOPSIS πΈ
#include <qb/qbipcc.h>
ssize_t qb_ipcc_sendv_recv(
qb_ipcc_connection_t *c, /* connection instance */
const struct iovec *iov, /* pointer to an iovec struct to send */
uint32_t iov_len, /* the number of iovecs used */
void *msg_ptr, /* pointer to a message buffer to receive into */
size_t msg_len, /* the size of the buffer */
int32_t ms_timeout /* max time to wait for a response*/
);
look at her. six params. she's serving. π
π PARAMS π
cβ your connection instance. the main character of this whole operation, honestly.iovβ pointer to aniovecstruct to send. the actual goods you're shipping out π¦iov_lenβ the number of iovecs used. like, how many of them. count them. don't lie.msg_ptrβ pointer to a message buffer to receive into. this is where the reply lands π«Άmsg_lenβ the size of the buffer. gotta know how much room the reply gets.ms_timeoutβ max time to wait for a response. in milliseconds. the patience budget β³
π« DESCRIPTION π«
okay so picture this: you've got a connection, you've got a pile of iovecs, and you're like "bestie, I need to send this AND get the reply back." normally that's two separate calls and two separate little brain cells dedicated to keeping track of them. not anymore.
this function is a convenience function. it simply sends and then recvs. that's the entire personality. it's giving "why do it in two steps when one step slays" β¨
you hand it your connection instance in c, the iovecs you want out the door in iov, how many of them in iov_len, a buffer to receive into in msg_ptr, the size of that buffer in msg_len, and a max wait time in ms_timeout. it handles the send-then-receive choreography so you don't have to. iconique. π
π NOTE π
bestie. listen. this one matters.msg_ptrwill include aqb_ipc_response_headerat the top of the message.
so like. the header is at the top. of the message. that you receive into msg_ptr. do not act surprised when you see it there. it was always going to be there. plan your buffer and your parsing accordingly, okay? π
π₯ SEE ALSO π₯
the whole friend group showed up, and they all ate:
qb_ipcc_send(3)qb_ipcc_recv(3)qb_ipcc_event_recv(3)qb_ipcc_connect_async(3)qb_ipcc_fc_enable_max_set(3)qb_ipcc_is_connected(3)qb_ipcc_connect_continue(3)qb_ipcc_auth_get(3)qb_ipcc_sendv(3)qb_ipcc_context_set(3)qb_ipcc_context_get(3)qb_ipcc_verify_dgram_max_msg_size(3)qb_ipcc_get_buffer_size(3)qb_ipcc_connect(3)qb_ipcc_disconnect(3)qb_ipcc_fd_get(3)
iykyk π§
π COPYRIGHT π
Copyright (C) 2010-2020 Red Hat, Inc.
libqb Β· page date 2025-09-16 Β· originally filed under QB_IPCC_SENDV_RECV(3)
okay that's the whole page bestie, go forth and send-then-recv responsibly πβ¨ bye π
π¦ 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