MessageMgr::GetServerFlag
Defined in:
Returns a boolean value indicating whether the local machine is the server.
C4Messages.h
Prototype
bool GetServerFlag(void) const;
Description
The GetServerFlag
function returns true
if the Message Manager has been configured as the server in a multiplayer game or if the Message Manager is in single player mode.Upon initial construction, the Message Manager is in single player mode. The Message Manager can be configured as the server for a multiplayer game by calling
MessageMgr::BeginMultiplayerGame
with the host
parameter set to true
.The only case in which the
GetServerFlag
function returns false
is when the Message Manager has been configured as a client in a multiplayer game. This is done by calling MessageMgr::BeginMultiplayerGame
with the host
parameter set to false
.
See Also
MessageMgr::BeginSinglePlayerGame