Created
March 10, 2010 14:32
-
-
Save sebastiaanvisser/327913 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Network.C10kServer | |
import System.IO | |
main :: IO () | |
main = | |
runC10kServer (\h i -> hPutStrLn h $ "HTTP/1.1 200 Ok\r\nContent-Type: text/plain; charset=UTF-8\r\n\r\n" ++ show i) | |
C10kConfig | |
{ initHook = return () | |
, exitHook = \s -> print ("err", s) | |
, parentStartedHook = putStrLn "prefork" | |
, startedHook = putStrLn "started" | |
, sleepTimer = 10 | |
, preforkProcessNumber = 10 | |
, threadNumberPerProcess = 100 | |
, portName = "80" | |
, pidFile = "pid" | |
, user = "sebas" | |
, group = "wheel" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment