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

Function __close_conn

examples/proxy.c:874–886  ·  view source on GitHub ↗

* Close this connection - send a ring message to the connection with intent * to stop. When the client gets the message, it will initiate the stop. */

Source from the content-addressed store, hash-verified

872 * to stop. When the client gets the message, it will initiate the stop.
873 */
874static void __close_conn(struct io_uring *ring, struct conn *c)
875{
876 struct io_uring_sqe *sqe;
877 uint64_t user_data;
878
879 printf("Client %d: queueing stop\n", c->tid);
880
881 user_data = __raw_encode(c->tid, __STOP, 0, 0);
882 sqe = io_uring_get_sqe(ring);
883 io_uring_prep_msg_ring(sqe, c->ring.ring_fd, 0, user_data, 0);
884 encode_userdata(sqe, c, __NOP, 0, 0);
885 io_uring_submit(ring);
886}
887
888static void close_cd(struct conn *c, struct conn_dir *cd)
889{

Callers 1

house_keepingFunction · 0.85

Calls 4

__raw_encodeFunction · 0.85
io_uring_submitFunction · 0.85
encode_userdataFunction · 0.70
io_uring_get_sqeFunction · 0.50

Tested by

no test coverage detected