simple-sendfile-0.0.2: Cross platform library for the sendfile system call

Network.Sendfile

Description

Cross platform library for the sendfile system call. This library tries to call minimum system calls which are the bottleneck of web servers.

Synopsis

Documentation

sendfile :: Socket -> FilePath -> FileRange -> IO ()Source

Simple binding for sendfile() of Linux. Used system calls:

  • EntireFile -- open(), stat(), sendfile(), and close() - PartOfFile -- open(), sendfile(), and close()

If the size of the file is unknown when sending the entire file, specifying PartOfFile is much faster.

data FileRange Source

File range for sendfile.