module Network.HTTP2.Server.Types where
import Network.Socket (SockAddr)
import qualified System.TimeManager as T
import Imports
import Network.HTTP2.H2
type Server = Request -> Aux -> (Response -> [PushPromise] -> IO ()) -> IO ()
newtype Request = Request InpObj deriving (Int -> Request -> ShowS
[Request] -> ShowS
Request -> String
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
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
}
data Aux = Aux
{ Aux -> Handle
auxTimeHandle :: T.Handle
, Aux -> SockAddr
auxMySockAddr :: SockAddr
, Aux -> SockAddr
auxPeerSockAddr :: SockAddr
}