module Network.HTTP2.Server.Types where
import qualified System.TimeManager as T
import Imports
import Network.HTTP2.Arch
import Network.HTTP2.Frame
type Server = Request -> Aux -> (Response -> [PushPromise] -> IO ()) -> IO ()
newtype Request = Request InpObj deriving (Int -> Request -> ShowS
[Request] -> ShowS
Request -> String
(Int -> Request -> ShowS)
-> (Request -> String) -> ([Request] -> ShowS) -> Show Request
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Request] -> ShowS
$cshowList :: [Request] -> ShowS
show :: Request -> String
$cshow :: Request -> String
showsPrec :: Int -> Request -> ShowS
$cshowsPrec :: Int -> Request -> ShowS
Show)
newtype Response = Response OutObj deriving (Int -> Response -> ShowS
[Response] -> ShowS
Response -> String
(Int -> Response -> ShowS)
-> (Response -> String) -> ([Response] -> ShowS) -> Show Response
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Response] -> ShowS
$cshowList :: [Response] -> ShowS
show :: Response -> String
$cshow :: Response -> String
showsPrec :: Int -> Response -> ShowS
$cshowsPrec :: Int -> Response -> ShowS
Show)
data PushPromise = PushPromise {
PushPromise -> ByteString
promiseRequestPath :: ByteString
, PushPromise -> Response
promiseResponse :: Response
, PushPromise -> Int
promiseWeight :: Weight
}
{-# DEPRECATED promiseWeight "Don't use this" #-}
newtype Aux = Aux {
Aux -> Handle
auxTimeHandle :: T.Handle
}