- 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
- 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
Documentation
A generic handler context that contains all the information needed by the request handlers to perform their task and to set up a proper response. All the fields in the context are accessible using the first class labels defined below.
Context | |
|
cServerHost :: Context p :-> StringSource
The server hostname.
cAdminMail :: Context p :-> StringSource
The mail address of the server adminstrator.
cRawRequest :: Context p :-> Http RequestSource
The unaltered HTTP request header as received from a client.
cRawResponse :: Context p :-> Http ResponseSource
The plain HTTP response header unaffected by local rewriting.
cHandle :: Context p :-> HandleSource
File descriptor associated with socket for the connection to the peer.
cClientAddr :: Context p :-> SockAddrSource
Client address.
cServerAddr :: Context p :-> SockAddrSource
Server address.