gore-and-ash-sync-1.1.1.0: Gore&Ash module for high level network synchronization

Copyright(c) Anton Gushcha, 2015-2016
LicenseBSD3
Maintainerncrashed@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Game.GoreAndAsh.Sync.Remote.Actor

Description

 

Synopsis

Documentation

class NetworkMessage i => RemoteActor i a | i -> a, a -> i Source

API to support automatic synchronization of actors between client and server

Associated Types

type RemoteActorState i :: * Source

State of remote actor (should be equal a)

type RemoteActorId a :: * Source

Id of remote actor (should be equal i)

newtype RemActorId i Source

Id of synchronization actor build over another actor

Constructors

RemActorId 

Fields

unRemActorId :: i
 

Instances

data RemActorNetMessage i Source

Network protocol of synchronization actor

Constructors

RemActorSyncRequest

Request full synchronization

RemActorSyncValue !Word64 !ByteString

Carries value of indexed value

clientSync Source

Arguments

:: (ActorMonad m, SyncMonad m, NetworkMonad m, LoggingMonad m, RemoteActor i a) 
=> Sync m i s a

Sync strategy

-> Peer

Server connection

-> i

Actor id

-> GameWire m s a

Synchronizing of client state

Perform client side synchronization

serverSync Source

Arguments

:: (MonadFix m, ActorMonad m, SyncMonad m, NetworkMonad m, LoggingMonad m, RemoteActor i a) 
=> Sync m i s a

Sync strategy

-> i

Actor id

-> GameWire m s a

Synchronizing of server state

Perform server side synchronization

registerRemoteActor Source

Arguments

:: (ActorMonad m, ActorMessage i, RemoteActor i a) 
=> proxy i

Proxy of type of base actor id

-> GameMonadT m ()

Register basic id

Need to be called once for each remote actor (remote collections actually do this)