@@ -7,8 +7,8 @@ module Network.Wai.HTTP2
77 , Responder
88 , Trailers
99 , promiseHeaders
10− , sendBuilder
11− , sendFilePart
10+ , writeBuilder
11+ , writeFilePart
1212 ) where
1313
1414import Data.ByteString (ByteString)
@@ -38,15 +38,14 @@ type HTTP2Application = Request -> PushFunc -> Responder
3838-- | Part of a streaming response -- either a 'Builder' or a range of a file.
3939data Chunk = FileChunk FilePath (Maybe FilePart) | BuilderChunk Builder
4040
41−-- TODO send -> write
4241-- | Given the write function of a stream body, write the given 'Builder'.
43−sendBuilder :: (Chunk -> IO ()) -> Builder -> IO ()
44−sendBuilder = (. BuilderChunk)
42+writeBuilder :: (Chunk -> IO ()) -> Builder -> IO ()
43+writeBuilder = (. BuilderChunk)
4544
4645-- | Given the write function of a stream body, write part or all of the given
4746-- file.
48−sendFilePart :: (Chunk -> IO ()) -> FilePath -> Maybe FilePart -> IO ()
49−sendFilePart = (.: FileChunk)
47+writeFilePart :: (Chunk -> IO ()) -> FilePath -> Maybe FilePart -> IO ()
48+writeFilePart = (.: FileChunk)
5049 where f .: g = curry $ f . uncurry g
5150
5251-- | The streaming body of a response. Equivalent to