on master help sign in
adding comments.
commitf1bc08dd076e87c02d6213f372904817a7dd8927 authorKazu Yamamoto <kazu@iij.ad.jp> dateTue 21 Jul 2015, 11:32 (11 years ago) parent9be26ff
1 file changed+9−2
warp/Network/Wai/Handler/Warp/HTTP2/Worker.hs+9−2
warp/Network/Wai/Handler/Warp/HTTP2/Worker.hs+9−2
@@ -33,8 +33,15 @@ import Network.Wai.Internal (Response(..), ResponseReceived(..), ResponseReceive
3333
3434----------------------------------------------------------------
3535
36−type Responder = ThreadContinue -> T.Handle -> Stream -> Priority -> Request -> Response -> IO ResponseReceived
37−
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.
39+type Responder = ThreadContinue -> T.Handle -> Stream -> Priority -> Request ->
40+ Response -> IO ResponseReceived
41+
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.
3845response :: Context -> Manager -> Responder
3946response Context{outputQ} mgr tconf th strm pri req rsp = do
4047 case rsp of