CCommManager
Up

Purpose:
Handles the communication management.
Methods:
void SetCommParams() - Presents the Comm. preferences dialog.
BOOL OnNewGame() - Initialize Direct Play COM object and starts communication.
BOOL OnStopGame() - Disconnects current communications.
BOOL IsConnected() - Returns TRUE if we are currently connected to a session.
BOOL IsHost() - Returns TRUE if we are hosting a game session.
UINT ThreadEntry (LPVOID pParam = 0) - The game manager's main loop.
void NotifyBonusEaten (UINT uTankID) - Tell all the players a tank ate the current bonus.
void NotifyNewBonus (BonusType, DWORD, CPoint &) - Tell all the game managers a new bonus is born.
void NotifyExplodingTank(UINT uTankID) - Tell all the players a tank is exploding.
void NotifyCheckSum(CMessage::MessageData &) - Tell the host about a new checksum.
void NotifyChatMsg(LPCSTR szMsg) - Tell the host to dispatch the chat messsage.
CCommMessage& ExposeMessage() - Expose the internal message's buffer.
void SetHostID() - Set the host machine tank's ID.
void SendAsHost(DPID idTo) - Send message in buffer as the host machine.
DPID GetHostID () - Get the host machine tank's ID.
BOOL GetPlayerInfo (UINT ind, BOOL &, CString &, DWORD &, DWORD &) - Get remote player's information.
void GetPlayerName (DPID id, CString &) - Get the player name for tank (i).
BOOL KillPlayer (UINT uPlayerID) - Remove player from this session (destroys his tank).
 

Back Home Up Next