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

Function send_append

examples/proxy.c:1126–1142  ·  view source on GitHub ↗

* Queue a send based on the data received in this cqe, which came from * a completed receive operation. */

Source from the content-addressed store, hash-verified

1124 * a completed receive operation.
1125 */
1126static void send_append(struct conn *c, struct conn_dir *cd, void *data,
1127 int bid, int len)
1128{
1129 vlog("%d: send %d (%p, bid %d)\n", c->tid, len, data, bid);
1130
1131 assert(bid < nr_bufs);
1132
1133 /* if using provided buffers for send, add it upfront */
1134 if (send_ring) {
1135 struct conn_buf_ring *cbr = &c->out_br;
1136
1137 io_uring_buf_ring_add(cbr->br, data, len, bid, br_mask, 0);
1138 io_uring_buf_ring_advance(cbr->br, 1);
1139 } else {
1140 send_append_vec(cd, data, len);
1141 }
1142}
1143
1144/*
1145 * For non recvmsg && multishot, a zero receive marks the end. For recvmsg

Callers 3

recv_incFunction · 0.85
recv_bidsFunction · 0.85
recv_mshot_msgFunction · 0.85

Calls 1

send_append_vecFunction · 0.85

Tested by

no test coverage detected