Rust io_uring examples, based on @tokio/io-uring
- tcp_simple: A simple echo server in TCP, using only basic functionality
- uds_simple: As above, but using Unix Domain Sockets
- tcp_multishot: As in
tcp_simple, but withmultishotsupport for accept and receive. - uds_multishot: As in
tcp_multishot, but with Unix Domain Sockets. (pending)
- xfs_simple: Using
io_uringto read a file from XFS - nvme: Using
io_uringto read a NVMe device
- UDP example
- Fix
xfs_simpleexample - Better docs all around
- Use ring mapped buffers
- Should I use fixed buffers with NVMe commands?
- How do I create a QUIC example?
- How do I render the commands async?
- How many worker threads?
I'm creating a few examples using io_uring here, and I would like to add a simple quic example, starting from a client.
As you can see from the tcp example I have a simple network loop which waits for events from io_uring and keep track of them via a very simple state machine.
From what I understand quiche makes no assumption about which event loop it's going to be used with, so it would be perfect for my use case. On the client side what I would do would be:
- Create a new connection with
quiche::connect - Fire a
IORING_OP_CONNECTsubmission directed toward the server - Fire a
IORING_RECV_MULTISHOTsubmission to listen for packets incoming from the server - Call the
sendmethod to fetch data generated by quiche, and then send it usingIORING_OP_SENDMSG - Once data arrives, I should feed it to quiche via the
recvmethod
I should then repeat the last two steps until the connection is established, and I've received what I want.