-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Streaming Snap handlers -- -- Snap handlers for streaming access with range requests @package snap-stream @version 0.1.1.0 -- | HTTP range requests include a header specifying the range of bytes -- expected in the response. For example: -- --
-- Range: bytes=0-1023 ---- -- See this -- <https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests -- documentation> for more details on range requests. module Snap.Util.FileServe.Stream -- | Serves a file, with support for range requests and explicit mime type -- specification. -- -- This function can be used in the presence or absence of Range -- headers: it can be used to serve partial files and whole files. -- -- Similar to serveFile. serveStreamAs :: MonadSnap m => ByteString -> Word64 -> (Word64 -> Word64 -> OutputStream Builder -> IO ()) -> (OutputStream Builder -> IO ()) -> m () data RangeReq RangeReq :: !Word64 -> !Maybe Word64 -> RangeReq SuffixRangeReq :: !Word64 -> RangeReq rangeParser :: Parser RangeReq checkRangeReq :: MonadSnap m => Request -> (Word64 -> Word64 -> OutputStream Builder -> IO ()) -> Word64 -> m Bool fromShow :: Show a => a -> Builder