- hCloseConn :: (HandleM m, MonadIO m) => m a -> m ()
- hKeepAlive :: (QueueM m, HandleM m, HttpM' m, MonadIO m) => m a -> m ()
- emptyQueue :: QueueM m => m ()
Documentation
hCloseConn :: (HandleM m, MonadIO m) => m a -> m ()Source
Run a handler once and close the connection afterwards.
hKeepAlive :: (QueueM m, HandleM m, HttpM' m, MonadIO m) => m a -> m ()Source
Run a handler and keep the connection open for potential consecutive requests. The connection will only be closed after a request finished and one or more of the following criteria are met:
- There is no
contentLength
set in the response headers. When this is the case the connection cannot be kept alive. - The client has set the
connection
header field toclose
. - The connection has already been closed, possible due to IO errors.
- The HTTP version is HTTP/1.0.
emptyQueue :: QueueM m => m ()Source
Empty the send queue.