definition: |
mainServer :: CConfig -> Maybe Int -> IO () mainServer cconfig mbport = do putStrLn "Start Server" (port1,socket1) <- maybe listenOnFresh (\p -> listenOn p >>= \s -> return (p,s)) mbport putStrLn ("Server Port: "++show port1) storeServerPortNumber port1 getDefaultPath cconfig >>= setEnv "CURRYPATH" let numworkers = numberOfWorkers cconfig if numworkers > 0 then do serveraddress <- getServerAddress (workerport,workersocket) <- listenOnFresh debugMessage dl 2 ("SERVER: port to workers: "++show workerport) handles <- startWorkers cconfig numworkers workersocket serveraddress workerport [] serverLoop cconfig socket1 handles close workersocket else serverLoop cconfig socket1 [] where dl = debugLevel cconfig |
demand: |
no demanded arguments |
deterministic: |
deterministic operation |
documentation: |
--- Start the analysis server on a socket. |
indeterministic: |
might be indeterministic |
infix: |
no fixity defined |
name: |
mainServer |
precedence: |
no precedence defined |
result-values: |
_ |
signature: |
CASS.Configuration.CConfig -> Prelude.Maybe Prelude.Int -> Prelude.IO () |
solution-complete: |
operation might suspend on free variables |
terminating: |
possibly non-terminating |
totally-defined: |
possibly non-reducible on same data term |