#include <NetworkPlayer.h>
Inheritance diagram for CNetworkPlayer:
Public Member Functions | |
CNetworkPlayer (CBSock *pBSock) | |
CNetworkPlayer. | |
virtual | ~CNetworkPlayer (void) |
~CNetworkPlayer | |
CBSock * | GetNetworkSock () const |
GetNetworkSock. | |
Protected Member Functions | |
bool | OnInit () |
OnInit. | |
void | OnMessageReceived (CMessage *pMsg) |
OnMessageReceived. | |
void | OnForegroundProc () |
OnForegroundProc. | |
void | PostANetworkMsg (const CMessage *pMsg) |
PostANetworkMsg. |
Description: The CNetowrkPlayer class conforms to the player communication interface. The class provides for internet routing of system messages.
Limitations: None
|
CNetworkPlayer. Description: The constructor initializes internal attributes.
|
|
~CNetworkPlayer Description: This destructor has been included for maintenance only.
|
|
GetNetworkSock. Description: : This function returns a pointer to the attached CBSock.
|
|
OnForegroundProc. Description: This handler function is called during each iteration of the player thread's execution loop. In this function, the network connection CBSock's process function is called and the player checks to see if any network messages can be received.
Reimplemented from CPlayer. |
|
OnInit. Description: The OnInit function is called right when the thread is started. This version of the function verifies that a CBSock object has been attached via the constructor.
Reimplemented from CPlayer. |
|
OnMessageReceived. Description: This handler function is called when a message has been received by the host sent to the client (player). In this version of the function, the received message is written out over the network through a CBSock object. The CBSock's process function is callled after sending to speed up msg delivery.
Reimplemented from CPlayer. |
|
PostANetworkMsg. Description: This function posts a message over the network through the network player's CBSock connection.
|