* 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. */
| 872 | * to stop. When the client gets the message, it will initiate the stop. |
| 873 | */ |
| 874 | static 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 | |
| 888 | static void close_cd(struct conn *c, struct conn_dir *cd) |
| 889 | { |
no test coverage detected