-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | A portable sendfile library
--
-- A library which exposes zero-copy sendfile functionality in a portable
-- way. If a platform does not support sendfile, a fallback
-- implementation in haskell is provided.
--
-- Currently supported platforms: Windows 2000+ (Native), Linux 2.6+
-- (Native), FreeBSD (Untested!), Everything else (Haskell).
@package sendfile
@version 0.4
-- | A cross-platform wrapper for sendfile -- this implements an available
-- operating-system call if supported, otherwise it falls back to a
-- portable haskell implementation.
--
-- Two interfaces are provided for both the unsafe and safe sets of
-- functions. The first interface accepts an output socket/handle and the
-- path of the file you want to send; sendFile and unsafeSendFile
-- comprise this interface. The second interface accepts an output
-- socket/handle, a handle to the file you want to send, and the number
-- of bytes you want to send; sendFile' and unsafeSendFile' comprise this
-- interface.
--
-- For consistent read/write behavior with either sendFile' or
-- unsafeSendFile', the input handle should be opened in Binary mode
-- rather than Text mode (especially if you are using hSeek before
-- sending).
module Network.Socket.SendFile
-- | The simplest interface. Simply give it an output Socket and the
-- FilePath to the input file.
sendFile :: Socket -> FilePath -> IO ()
-- | A more powerful interface than sendFile, sendFile' accepts a
-- Handle for the input file instead of a FilePath and the
-- number of bytes you would like to read; this number must be a positive
-- integer. This unlocks the full potential Handle(s). For
-- instance, if you wanted to start reading from a particular offset in
-- the file you could utilize hSeek; if you needed the file size you
-- could use hFileSize.
sendFile' :: Socket -> Handle -> Integer -> IO ()
-- | The unsafe version of sendFile which accepts a Handle instead
-- of a Socket for the output. It will flush the output handle
-- before sending any file data.
unsafeSendFile :: Handle -> FilePath -> IO ()
-- | The unsafe version of sendFile' which accepts a Handle instead
-- of a Socket for the output. It will flush the output handle
-- before sending any file data.
unsafeSendFile' :: Handle -> Handle -> Integer -> IO ()
-- | Returns the mode that sendfile was compiled with. Mainly for debugging
-- use. Possible values are WIN32_SENDFILE, LINUX_SENDFILE,
-- FREEBSD_SENDFILE, and PORTABLE_SENDFILE.
sendFileMode :: String