Safe Haskell | None |
---|---|
Language | Haskell2010 |
Semantics of requests that are sent by clients to the server, in terms of game state changes and responses to be sent to the clients.
See https://github.com/LambdaHack/LambdaHack/wiki/Client-server-architecture.
Synopsis
- loopSer :: (MonadServerAtomic m, MonadServerComm m) => ServerOptions -> (Bool -> FactionId -> ChanServer -> IO ()) -> m ()
- data ChanServer = ChanServer {}
- serverOptionsPI :: ParserInfo ServerOptions
- data ServerOptions = ServerOptions {
- sknowMap :: Bool
- sknowEvents :: Bool
- sknowItems :: Bool
- sniff :: Bool
- sallClear :: Bool
- sboostRandomItem :: Bool
- sgameMode :: Maybe (GroupName ModeKind)
- sautomateAll :: Bool
- skeepAutomated :: Bool
- sdungeonRng :: Maybe SMGen
- smainRng :: Maybe SMGen
- snewGameSer :: Bool
- scurChalSer :: Challenge
- sdumpInitRngs :: Bool
- ssavePrefixSer :: String
- sdbgMsgSer :: Bool
- sassertExplored :: Maybe Int
- sshowItemSamples :: Bool
- sstopAfterGameOver :: Bool
- sclientOptions :: ClientOptions
Re-exported from Game.LambdaHack.Server.LoopM
:: (MonadServerAtomic m, MonadServerComm m) | |
=> ServerOptions | player-supplied server options |
-> (Bool -> FactionId -> ChanServer -> IO ()) | function that initializes a client and runs its main loop |
-> m () |
Start a game session, including the clients, and then loop, communicating with the clients.
The loop is started in server state that is empty, see emptyStateServer
.
Re-exported from Game.LambdaHack.Server.ProtocolM
data ChanServer Source #
Connection channel between the server and a single client.
Re-exported from Game.LambdaHack.Server.Commandline
serverOptionsPI :: ParserInfo ServerOptions Source #
Parser for server options from commandline arguments.
Re-exported from Game.LambdaHack.Server.ServerOptions
data ServerOptions Source #
Options that affect the behaviour of the server (including game rules).
ServerOptions | |
|
Instances
Show ServerOptions Source # | |
Defined in Game.LambdaHack.Server.ServerOptions showsPrec :: Int -> ServerOptions -> ShowS # show :: ServerOptions -> String # showList :: [ServerOptions] -> ShowS # | |
Binary ServerOptions Source # | |
Defined in Game.LambdaHack.Server.ServerOptions |