http11-server
(require http11-server) | package: http11-server |
1 HTTP(S) Endpoint
value
Dispatcher : (-> RequestHeader Handler)
value
Handler : (-> Input-Port Output-Port RequestHeader Void)
The input port and output port is the socket of the requesting client. The RequestHeader is the HTTP11 standard request information, HTTP Method, URI, Headings etc which has already be read off of the input port (necessary for dispatch logic which selects the appropriate Handler to invoke.
Payload information (if it exists e.g. for a POST) has not been read from the input port and assumed to be performed by the handler from the input port.
The output port, which has nothing written to it prior to invocation of this Handler. In other words, the Handler is completely responsible for the entire HTTP response.
struct
(struct Endpoint (hostname dispatcher port cert) #:transparent) hostname : String dispatcher : Dispatcher port : Port cert : Server-Certificate
procedure
(launch-endpoint endpoint) → Endpoint-Process
endpoint : Endpoint
The return Endpoint-Process instance is used to manage the endpoint.