module Network.Salvia.Core.Config ( HttpdConfig (..) , defaultConfig ) where import Network.Socket hiding (send, listen) import System.IO -------- server configuration ------------------------------------------------- data HttpdConfig = HttpdConfig { hostname :: String -- Server hostname. , email :: String -- Server admin email address. , listenAddr :: HostAddress -- Addres to bind to. , listenPort :: PortNumber -- Port to listen on. , backlog :: Int -- TCP backlog. , bufferSize :: Int -- Serve chunck with size. } defaultConfig :: IO HttpdConfig defaultConfig = do addr <- inet_addr "0.0.0.0" return $ HttpdConfig { hostname = "hostname" , email = "www@hostname" , listenAddr = addr , listenPort = 80 , backlog = 4 , bufferSize = 64 * 1024 }