File: Sendfile.hs

package info (click to toggle)
haskell-simple-sendfile 0.2.32-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,104 kB
  • sloc: haskell: 324; makefile: 6
file content (29 lines) | stat: -rw-r--r-- 560 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{-# LANGUAGE CPP #-}

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

module Network.Sendfile (
    sendfile
  , sendfileWithHeader
#if OS_BSD || OS_MacOS || OS_Linux
  , sendfileFd
  , sendfileFdWithHeader
#endif
  , FileRange(..)
  ) where

import Network.Sendfile.Types

#ifdef OS_BSD
import Network.Sendfile.BSD
#elif  OS_MacOS
import Network.Sendfile.BSD
#elif  OS_Linux
import Network.Sendfile.Linux
#else
import Network.Sendfile.Fallback
#endif