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

Function handle_connect

examples/proxy.c:1086–1100  ·  view source on GitHub ↗

* Connection to the other end is done, submit a receive to start receiving * data. If we're a bidirectional proxy, issue a receive on both ends. If not, * then just a single recv will do. */

Source from the content-addressed store, hash-verified

1084 * then just a single recv will do.
1085 */
1086static int handle_connect(struct io_uring *ring, struct io_uring_cqe *cqe)
1087{
1088 struct conn *c = cqe_to_conn(cqe);
1089
1090 pthread_mutex_lock(&thread_lock);
1091 open_conns++;
1092 pthread_mutex_unlock(&thread_lock);
1093
1094 if (bidi)
1095 submit_bidi_receive(ring, c);
1096 else
1097 submit_receive(ring, c);
1098
1099 return 0;
1100}
1101
1102/*
1103 * Append new segment to our currently active msg_vec. This will be submitted

Callers 1

handle_cqeFunction · 0.85

Calls 3

cqe_to_connFunction · 0.85
submit_bidi_receiveFunction · 0.85
submit_receiveFunction · 0.85

Tested by

no test coverage detected