MCPcopy Create free account
hub / github.com/axboe/liburing / send_append_vec

Function send_append_vec

examples/proxy.c:1108–1120  ·  view source on GitHub ↗

* Append new segment to our currently active msg_vec. This will be submitted * as a sendmsg (with all of it), or as separate sends, later. If we're using * send_ring, then we won't hit this path. Instead, outgoing buffers are * added directly to our outgoing send buffer ring. */

Source from the content-addressed store, hash-verified

1106 * added directly to our outgoing send buffer ring.
1107 */
1108static void send_append_vec(struct conn_dir *cd, void *data, int len)
1109{
1110 struct msg_vec *mvec = snd_msg_vec(cd);
1111
1112 if (mvec->iov_len == mvec->vec_size) {
1113 mvec->vec_size <<= 1;
1114 mvec->iov = realloc(mvec->iov, mvec->vec_size * sizeof(struct iovec));
1115 }
1116
1117 mvec->iov[mvec->iov_len].iov_base = data;
1118 mvec->iov[mvec->iov_len].iov_len = len;
1119 mvec->iov_len++;
1120}
1121
1122/*
1123 * Queue a send based on the data received in this cqe, which came from

Callers 1

send_appendFunction · 0.85

Calls 1

snd_msg_vecFunction · 0.85

Tested by

no test coverage detected