@@ -33,8 +33,15 @@ import Network.Wai.Internal (Response(..), ResponseReceived(..), ResponseReceive
34----------------------------------------------------------------
34----------------------------------------------------------------
36+-- | The wai definition is 'type Application = Request -> (Response -> IO ResponseReceived) -> IO ResponseReceived'.
37+-- This type implements the second argument (Response -> IO ResponseReceived)
38+-- with extra arguments.
36−type Responder = ThreadContinue -> T.Handle -> Stream -> Priority -> Request -> Response -> IO ResponseReceived
39+type Responder = ThreadContinue -> T.Handle -> Stream -> Priority -> Request ->
37−
40+ Response -> IO ResponseReceived
42+-- | This function is passed to workers.
43+-- They also pass 'Response's from 'Application's to this function.
44+-- This function enqueues commands for the HTTP/2 sender.
38response :: Context -> Manager -> Responder
45response :: Context -> Manager -> Responder
39response Context{outputQ} mgr tconf th strm pri req rsp = do
46response Context{outputQ} mgr tconf th strm pri req rsp = do
40 case rsp of
47 case rsp of