-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Library for writing fast/scalable TCP-based services -- -- Library for writing fast/scalable TCP-based services @package scalable-server @version 0.2.2 module Network.Server.ScalableServer -- | Given a pipeline specification and a port, run TCP traffic using the -- pipeline for parsing, processing and response. -- -- Note: there is currently no way for a server to specific the socket -- should be disconnected runServer :: RequestPipeline a -> PortNumber -> IO () -- | The RequestPipeline acts as a specification for your service, -- indicating both a parser/request object generator, the RequestCreator, -- and the processor of these requests, one that ultimately generates a -- response expressed by a blaze Builder data RequestPipeline a RequestPipeline :: (RequestCreator a) -> (RequestProcessor a) -> PipelineSize -> RequestPipeline a -- | The RequestCreator is an Attoparsec parser that yields some request -- object a type RequestCreator a = Parser a -- | The RequestProcessor is a function in the IO monad (for DB access, -- etc) that returns a builder that can generate the response type RequestProcessor a = a -> IO Builder