All Projects → tailhook → tk-sendfile

tailhook / tk-sendfile

Licence: Apache-2.0, MIT licenses found Licenses found Apache-2.0 LICENSE-APACHE MIT LICENSE-MIT
A thread pool for rust/tokio that can process file requests and send data to the socket with zero copy (using sendfile)

Programming Languages

rust
11053 projects

Sendfile for Tokio

Status:alpha
Documentation:http://docs.rs/tk-sendfile

A thread pool that can process file requests and send data to the socket with zero copy (using sendfile).

Challenges:

  1. While sendfile is non-blocking when writing to socket, it blocks for disk access for two cases: initial open() and for reading file inside the sendfile() system call itself
  2. Doing more than single sendfile operation requires some bookkeeping
  3. It should be possible to implement file cache (both opened files and in-memory file data) transparently for the user
  4. [TODO] Serving user-specified file paths requires non-trivial code to prevent symlink attacks

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].