Comments (1)
Also the best way is probably to use io_uring for that too, from liburing:
This splice operation can be used to implement sendfile by splicing to an
intermediate pipe first, then splice to the final destination.
In fact, the implementation of sendfile in kernel uses splice internally.
And in case it wasn't clear, a comment explains it:
in the io_uring case, you should be able to build a splice-based sendfile yourself using a pipe you create via pipe(2) to act as the buffer. Or do similar via fixed buffers in the ring instead of splice.
https://lwn.net/Articles/868193/
from io_uring-by-example.
Related Issues (12)
- Error in example 2? HOT 1
- Polled IO examples HOT 1
- Got error in example 05_webserver_liburing
- 05 example failed on ubuntu20.04 server with invalid argument error HOT 6
- Weird behaviour with example 05 HOT 1
- 03_cat_liburing HOT 1
- 5 web server async file access?
- how do u install liburing-dev for ubuntu 20.04?
- Possible to make this into a full fledge http server with multi threading? HOT 1
- cp_liburing can't copy the file content after first invoke
- Lost of in-progress I/Os upon io_uring exit
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from io_uring-by-example.