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.
Documentation
sendfile :: Socket -> FilePath -> FileRange -> IO () -> IO ()
Simple binding for sendfile() of BSD.
- Used system calls: open(), sendfile(), and close().
The fourth action argument is called when a file is sent as chunks. Chucking is inevitable if the socket is non-blocking (this is the default) and the file is large. The action is called after a chunk is sent and bofore waiting the socket to be ready for writing.
data FileRange
File range for sendfile
.
Constructors
EntireFile | |
PartOfFile | |
Fields
|