module Network.HTTP.Semantics.Client.Internal (
    Request (..),
    Response (..),
    Aux (..),
    defaultAux,
) where

import Network.HTTP.Semantics.Types (InpObj (..), OutObj (..))

-- | Request from client.
newtype Request = Request OutObj 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
$cshowsPrec :: Int -> Request -> ShowS
showsPrec :: Int -> Request -> ShowS
$cshow :: Request -> String
show :: Request -> String
$cshowList :: [Request] -> ShowS
showList :: [Request] -> ShowS
Show)

-- | Response from server.
newtype Response = Response InpObj 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
$cshowsPrec :: Int -> Response -> ShowS
showsPrec :: Int -> Response -> ShowS
$cshow :: Response -> String
show :: Response -> String
$cshowList :: [Response] -> ShowS
showList :: [Response] -> ShowS
Show)

-- | Additional information.
data Aux = Aux
    { Aux -> IO Int
auxPossibleClientStreams :: IO Int
    -- ^ How many streams can be created without blocking.
    , Aux -> IO ()
auxSendPing :: IO ()
    -- ^ Sending a ping.
    }

defaultAux :: Aux
defaultAux :: Aux
defaultAux =
    Aux
        { auxPossibleClientStreams :: IO Int
auxPossibleClientStreams = Int -> IO Int
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int
0
        , auxSendPing :: IO ()
auxSendPing = () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
        }