module Network.Salvia.Impl.Context where
import Data.Record.Label
import Network.Protocol.Http
import Network.Salvia.Interface
import Network.Socket
import System.IO
data Context p = Context
{ _cServerHost :: String
, _cAdminMail :: String
, _cListenOn :: [SockAddr]
, _cRequest :: Http Request
, _cResponse :: Http Response
, _cRawRequest :: Http Request
, _cRawResponse :: Http Response
, _cSocket :: Socket
, _cHandle :: Handle
, _cClientAddr :: SockAddr
, _cServerAddr :: SockAddr
, _cQueue :: SendQueue
, _cPayload :: p
} deriving (Show)
$(mkLabels [''Context])
cServerHost :: Context p :-> String
cAdminMail :: Context p :-> String
cListenOn :: Context p :-> [SockAddr]
cPayload :: Context p :-> p
cRequest :: Context p :-> Http Request
cResponse :: Context p :-> Http Response
cRawRequest :: Context p :-> Http Request
cRawResponse :: Context p :-> Http Response
cSocket :: Context p :-> Socket
cHandle :: Context p :-> Handle
cClientAddr :: Context p :-> SockAddr
cServerAddr :: Context p :-> SockAddr
cQueue :: Context p :-> SendQueue