
Public Member Functions | |
| int | addSyncable (Syncable *_syncableP) |
| Add a Syncable in order to synchronize it across the network. | |
| void | addSyncables (Array< Syncable * > _syncablePArray) |
| Add several Syncables in order to synchronize them across the network. | |
| void | broadcastScriptEvent (int _identifier, const string &_param) |
| Can be used when a script is not executed on the clients. | |
| void | doNetwork () |
| Main method of the server. Must be called from main loop. | |
| bool | getAllClientsReady () |
| Indicates if the game can begin. | |
| void | getAllPlayerIDs (Array< int > &ids) |
| int | getConnectedClientsAmount () |
| Returns the amount of connected clients. | |
| SyncableMap * | getSyncableMapP () |
| Returns a pointer to the server's syncableMap. | |
| void | removeSyncable (Syncable *_syncableP) |
| Removes a Syncable from the server and all clients. | |
| void | removeSyncables (Array< Syncable * > _syncablePArray) |
| Removes the Syncables from the server and all clients. | |
| void | sendScriptEventToClient (int _syncableID, int _identifier, const string &_param) |
| Can be used to notify a client about reached checkpoints and similar events. | |
| void | setBlockNewClients (bool _blockNewClients) |
| Stops more clients from connecting. | |
| void | setContext (NetworkDevice *_networkDeviceP, Log *_networkLogP, Logic *_logicP, DiscoverySettings *_discoverySettingsP) |
| Prepares the server for use. | |
| void | shutDown () |
| Shuts down the server. Can be called several times. | |
| void | startUp (DiscoveryAdvertisement *_discoveryAdvertisementP, int _portNumber, int _maxPlayers) |
| Method to start the server. Don't call a second time before shutting down first. | |
| void | updateAllSyncables () |
| Causes the properties of all added Syncables to be broadcastet. | |
| void | updateAllSyncableStates () |
| Causes the state of all added Syncables to get broadcastet. | |
| void | updateLogic () |
| Synchronizes the state of the Logic class across the network (example: who is leading the race?). | |
| void | updateSyncable (Syncable *_syncableP) |
| Synchronizes the properties of an added Syncable via a MessageCreateSyncable. | |
| void | updateSyncables (Array< Syncable * > _syncablePArray) |
| Causes the properties of the Syncables to be broadcastet. | |
| void | updateSyncableState (Syncable *_syncableP) |
| Synchronizes only the state of an added Entity via a MessageSyncableState. | |
| void | updateSyncableStates (Array< Syncable * > _syncablePArray) |
| Causes the state of the Syncables to get broadcastet. | |
Static Public Member Functions | |
| static void | createInstance () |
| creates the singleton instance | |
| static void | destroyInstance () |
| destroys the singleton instance | |
| static Server * | getInstance () |
| accesses the singleton instance | |
| static bool | isActive () |
| checks if the singleton is active | |
| static bool | isDestroyed () |
| checks if the singleton is destroyed | |
| static bool | isVirgin () |
| checks if the singleton has not been initialized | |
Protected Member Functions | |
| Singleton () | |
Static Protected Member Functions | |
| static void | destroyedError () |
| static void | initInstance () |
Friends | |
| class | Client |
|
|
Add a Syncable in order to synchronize it across the network. called by 1. acceptIncomingClient - for adding a special Entity: PlayerEntitiy 2. non network class - for adding a normal Entity
|
|
|
Add several Syncables in order to synchronize them across the network.
|
|
||||||||||||
|
Can be used when a script is not executed on the clients.
|
|
|
creates the singleton instance
|
|
|
|
|
|
destroys the singleton instance
|
|
|
Main method of the server. Must be called from main loop.
|
|
|
Indicates if the game can begin. return true when all connected clients are ready for a game |
|
|
|
|
|
Returns the amount of connected clients.
|
|
|
accesses the singleton instance The exact operation executed by calling this function is determined by the singleton policies.
|
|
|
Returns a pointer to the server's syncableMap.
|
|
|
|
|
|
checks if the singleton is active
|
|
|
checks if the singleton is destroyed
This function returns
|
|
|
checks if the singleton has not been initialized A singleton is not initialized if no instance exists and no instance has been destroyed.
|
|
|
Removes a Syncable from the server and all clients.
|
|
|
Removes the Syncables from the server and all clients.
|
|
||||||||||||||||
|
Can be used to notify a client about reached checkpoints and similar events.
|
|
|
Stops more clients from connecting.
|
|
||||||||||||||||||||
|
Prepares the server for use. Sets the state of the server so that is can function properly
|
|
|
Shuts down the server. Can be called several times.
|
|
|
|
|
||||||||||||||||
|
Method to start the server. Don't call a second time before shutting down first.
|
|
|
Causes the properties of all added Syncables to be broadcastet.
|
|
|
Causes the state of all added Syncables to get broadcastet.
|
|
|
Synchronizes the state of the Logic class across the network (example: who is leading the race?).
|
|
|
Synchronizes the properties of an added Syncable via a MessageCreateSyncable.
|
|
|
Causes the properties of the Syncables to be broadcastet.
|
|
|
Synchronizes only the state of an added Entity via a MessageSyncableState.
|
|
|
Causes the state of the Syncables to get broadcastet.
|
|
|
|
1.4.3