| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Game.LambdaHack.Server
Contents
Description
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, MonadServerReadRequest 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 StdGen
- smainRng :: Maybe StdGen
- snewGameSer :: Bool
- scurChalSer :: Challenge
- sdumpInitRngs :: Bool
- ssavePrefixSer :: String
- sdbgMsgSer :: Bool
- sclientOptions :: ClientOptions
Re-exported from Game.LambdaHack.Server.LoopM
Arguments
| :: (MonadServerAtomic m, MonadServerReadRequest 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.
Constructors
| ChanServer | |
Fields | |
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).
Constructors
| ServerOptions | |
Fields
| |
Instances
| Show ServerOptions Source # | |
Defined in Game.LambdaHack.Server.ServerOptions Methods showsPrec :: Int -> ServerOptions -> ShowS # show :: ServerOptions -> String # showList :: [ServerOptions] -> ShowS # | |
| Binary ServerOptions Source # | |
Defined in Game.LambdaHack.Server.ServerOptions | |