Revision 0fbc8447 src/Ganeti/Query/Server.hs
b/src/Ganeti/Query/Server.hs | ||
---|---|---|
38 | 38 |
import Data.Bits (bitSize) |
39 | 39 |
import qualified Data.Set as Set (toList) |
40 | 40 |
import Data.IORef |
41 |
import qualified Network.Socket as S |
|
42 | 41 |
import qualified Text.JSON as J |
43 | 42 |
import Text.JSON (encode, showJSON, JSValue(..)) |
44 | 43 |
import System.Info (arch) |
... | ... | |
350 | 349 |
|
351 | 350 |
-- | Main listener loop: accepts clients, forks an I/O thread to handle |
352 | 351 |
-- that client. |
353 |
listener :: MVar () -> JQStatus -> ConfigReader -> S.Socket -> IO ()
|
|
352 |
listener :: MVar () -> JQStatus -> ConfigReader -> Server -> IO ()
|
|
354 | 353 |
listener qlock qstat creader socket = do |
355 | 354 |
client <- acceptClient socket |
356 | 355 |
_ <- forkIO $ clientLoop qlock qstat client creader |
357 | 356 |
return () |
358 | 357 |
|
359 | 358 |
-- | Type alias for prepMain results |
360 |
type PrepResult = (FilePath, S.Socket, IORef (Result ConfigData), JQStatus)
|
|
359 |
type PrepResult = (FilePath, Server, IORef (Result ConfigData), JQStatus)
|
|
361 | 360 |
|
362 | 361 |
-- | Check function for luxid. |
363 | 362 |
checkMain :: CheckFn () |
Also available in: Unified diff