iterio-server-0.0: Library for building servers with IterIO



Generic building blocks for creating TCP Servers based on IterIO



data TCPServer inp m out Source

TCPServer holds all the information necessary to run bind to a sock and respond to TCP requests from the network.


Show (TCPServer inp m out) 

runTCPServer :: (ListLikeIO inp e, ListLikeIO out e, ChunkData inp, ChunkData out, HasFork m) => TCPServer inp m out -> m ()Source

Runs a TCPServer in a loop.

simpleHttpServer :: HasFork m => PortNumber -> HttpRequestHandler m () -> TCPServer ByteString m ByteStringSource

Creates a simple HTTP server from an HTTPRequestHandler.

echoServer :: HasFork m => PortNumber -> TCPServer String m StringSource

Creates a TCPServer that echoes each line from the client until EOF.