C4 Engine
C4 Engine API Documentation

class MessageMgr

Defined in:  C4Messages.h
The Message Manager class.
Definition

class MessageMgr : public Manager<MessageMgr>

Member Functions
MessageMgr::GetServerFlag Returns a boolean value indicating whether the local machine is the server.
MessageMgr::GetMultiplayerFlag Returns a boolean value indicating whether the Message Manager is configured for a multiplayer game.
MessageMgr::GetSynchronizedFlag Returns a boolean value indicating whether a new client machine is fully synchronized with the server.
MessageMgr::GetPlayerCount Returns the current number of players connected to a multiplayer game.
MessageMgr::GetMaxPlayerCount Returns the maximum number of players that the server will allow in a multiplayer game.
MessageMgr::SetMaxPlayerCount Sets the maximum number of players that the server will allow in a multiplayer game.
 
MessageMgr::BeginSinglePlayerGame Configures the Message Manager for a single player game.
MessageMgr::BeginMultiplayerGame Configures the Message Manager for a multiplayer game.
MessageMgr::EndGame Tells the Message Manager that a game has ended so it can clean up.
MessageMgr::Connect Establishes a connection with a server.
MessageMgr::Disconnect Terminates a connection with a server.
MessageMgr::DisconnectAll Terminates all current connections.
MessageMgr::SetPlayerCreator Sets the creator callback function for Player objects.
MessageMgr::GetFirstPlayer Returns the first player in the map of players maintained by the Message Manager.
MessageMgr::GetLocalPlayer Returns the player representing the local machine.
MessageMgr::GetPlayer Returns the player having a specific key.
MessageMgr::GetSnapshotInterval Returns the time in between snapshots.
MessageMgr::GetSnapshotFrequency Returns the snapshot frequency.
MessageMgr::SetSnapshotInterval Sets the time in between snapshots.
MessageMgr::InstallStateSender Installs a state-sending function.
MessageMgr::AddSnapshotSender Registers a snapshot-sending object.
MessageMgr::RemoveSnapshotSender Registers a snapshot-sending object.
MessageMgr::SendMessage Sends a message to a player in a multiplayer game.
MessageMgr::SendMessageAll Sends a message to all players in a multiplayer game.
MessageMgr::SendMessageClients Sends a message from the server to all clients in a multiplayer game.
MessageMgr::SendMessageJournal Sends a controller message to all player in a multiplayer game and adds it to the message journal.
MessageMgr::SendConnectionlessMessage Sends a message to a remote machine for which no connection exists.
MessageMgr::BroadcastServerQuery Locates servers on a LAN.
 
MessageMgr::AddressToString Generates a text string corresponding to a network address.
MessageMgr::StringToAddress Reads a network address from a text string.
Description
The MessageMgr class encapsulates the high-level networking and multiplayer features of the engine. Low-level networking functionality is exposed by the NetworkMgr class. The single instance of the Message Manager is constructed during an application's initialization and destroyed at termination.

The Message Manager's member functions are accessed through the global pointer TheMessageMgr.
See Also

Message

Player