prepare synchronisation primitives
This commit is contained in:
parent
4ef186dba2
commit
b2bd1d4e1d
1 changed files with 6 additions and 3 deletions
|
@ -14,9 +14,6 @@ import Library.Types.Map
|
||||||
|
|
||||||
data ServerMessage
|
data ServerMessage
|
||||||
= ServerQuit -- ^ Message notifying a client that the server is about to shut down.
|
= ServerQuit -- ^ Message notifying a client that the server is about to shut down.
|
||||||
| Ping -- ^ A servers's heartbeat request
|
|
||||||
{ pingID :: UUID -- ^ The random ID of the heartbeat request. NOT THE CLIENT'S 'UUID'!
|
|
||||||
}
|
|
||||||
| AcceptClient -- ^ Message notifying the client of being accepted and providing it's
|
| AcceptClient -- ^ Message notifying the client of being accepted and providing it's
|
||||||
-- newly registered 'UUID'
|
-- newly registered 'UUID'
|
||||||
{ acClientUUID :: UUID
|
{ acClientUUID :: UUID
|
||||||
|
@ -24,6 +21,9 @@ data ServerMessage
|
||||||
| ProvideInitialWizard -- ^ Message containing a newly created player character
|
| ProvideInitialWizard -- ^ Message containing a newly created player character
|
||||||
{ initWizard :: Wizard
|
{ initWizard :: Wizard
|
||||||
}
|
}
|
||||||
|
| Ping -- ^ A servers's heartbeat request
|
||||||
|
{ pingID :: UUID -- ^ The random ID of the heartbeat request. NOT THE CLIENT'S 'UUID'!
|
||||||
|
}
|
||||||
| TickUpdate -- ^ The Server's state update to the clients
|
| TickUpdate -- ^ The Server's state update to the clients
|
||||||
{ tuMapSlice :: MapSlice -- ^ The player's field of vision
|
{ tuMapSlice :: MapSlice -- ^ The player's field of vision
|
||||||
, tuWizard :: Wizard -- ^ the player's updated character
|
, tuWizard :: Wizard -- ^ the player's updated character
|
||||||
|
@ -39,6 +39,9 @@ data ClientMessagePayload
|
||||||
| ClientRequestWizard -- ^ Message for requesting a new player character
|
| ClientRequestWizard -- ^ Message for requesting a new player character
|
||||||
| ClientReady -- ^ Message requesting the server to position the client's character on the
|
| ClientReady -- ^ Message requesting the server to position the client's character on the
|
||||||
-- map
|
-- map
|
||||||
|
| Pong -- ^ A client's reply to a heartbeat request
|
||||||
|
{ pongId :: UUID -- ^ The 'UUID' of the original heartbeat request
|
||||||
|
}
|
||||||
deriving (Eq, Show, Generic)
|
deriving (Eq, Show, Generic)
|
||||||
|
|
||||||
data ClientMessage
|
data ClientMessage
|
||||||
|
|
Loading…
Reference in a new issue