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

Function arm_recv

test/recvsend_bundle.c:57–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55};
56
57static int arm_recv(struct io_uring *ring, struct recv_data *rd)
58{
59 struct io_uring_sqe *sqe;
60 int ret;
61
62 sqe = io_uring_get_sqe(ring);
63 io_uring_prep_recv_multishot(sqe, rd->accept_fd, NULL, 0, 0);
64 if (rd->recv_bundle && use_tcp)
65 sqe->ioprio |= IORING_RECVSEND_BUNDLE;
66 sqe->buf_group = RECV_BGID;
67 sqe->flags |= IOSQE_BUFFER_SELECT;
68 sqe->user_data = 2;
69
70 ret = io_uring_submit(ring);
71 if (ret != 1) {
72 fprintf(stderr, "submit failed: %d\n", ret);
73 return 1;
74 }
75
76 return 0;
77}
78
79static int recv_prep(struct io_uring *ring, struct recv_data *rd, int *sock)
80{

Callers 2

recv_prepFunction · 0.70
do_recvFunction · 0.70

Calls 2

io_uring_submitFunction · 0.85
io_uring_get_sqeFunction · 0.50

Tested by

no test coverage detected