Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CGateway Class Reference

CGateway. More...

#include <Gateway.h>

List of all members.

Public Member Functions

 CGateway (CONNECTION_TYPES hostType)
 CGateway.
void Process ()
 Process.
void AddIncomingConn (CNetworkPlayer *pPlayer)
 AddIncomingConn.
void FreePlayer (PLAYER_TYPES iType, int32 iQuant=1)
 FreePlayer.
bool AddPlayer (PLAYER_TYPES iType)
 FreePlayer.
bool SetConnectionLimit (CONNECTION_TYPES iConnectionType, int32 iCount)
 SetConnectionLimit.
int32 GetConnectionLimit (CONNECTION_TYPES iConnectionType) const
 GetConnectionLimit.
int32 GetConnectionCount (CONNECTION_TYPES iConnectionType) const
 GetConnectionCount.
bool SetPlayerLimit (PLAYER_TYPES iPlayerType, int32 iCount)
 SetPlayerLimit.
int32 GetPlayerLimit (PLAYER_TYPES iPlayerType) const
 GetPlayerLimit.
int32 GetPlayerCount (PLAYER_TYPES iPlayerType) const
 GetPlayerCount.
void AddOutgoingConn (CNetworkPlayer *pPlayer, CONNECTION_TYPES iReqType)
 AddOutgoingConn.
bool GetReadyPlayer (GATEWAY_CONN_INFO &)
 GetReadyPlayer.

Protected Member Functions

void TryAuthenticate (GATEWAY_CONN_INFO &, CMessage *pMsg)
 TryAuthenticate.
void PostRequest (CMailbox *pMbx, CONNECTION_REQUEST_BUFFER *)
 PostRequest.
void PostRejection (CMailbox *pMbx, int32 iReason, const char *sReason)
 PostRejection.
void PostAcceptance (CMailbox *pMbx)
 PostAcceptance.
bool ValidPlayerType (int32 iType) const
 ValidType.


Detailed Description

CGateway.

Description: This class manages new connections. All new connections are kept in "limbo" until their identity is discovered. Once the connection type is established, the connection is wrapped with appropriate player and is made available for retrieval.

Limitations: None


Constructor & Destructor Documentation

CGateway::CGateway CONNECTION_TYPES  hostType  ) 
 

CGateway.

Description:

Parameters:
kevin is a character string.
Returns:
void
Limitations:


Member Function Documentation

void CGateway::AddIncomingConn CNetworkPlayer pPlayer  ) 
 

AddIncomingConn.

Description:

Parameters:
kevin is a character string.
Returns:
void
Limitations:

void CGateway::AddOutgoingConn CNetworkPlayer pPlayer,
CONNECTION_TYPES  iReqType
 

AddOutgoingConn.

Description: This function can be used by CLIENTs attempting to connect to a host that is guarded by a gateway authenticator.

Parameters:
pPlayer - A pointer to the network player that is temporarily managing the connection.
iReqType - The type of the source, the one connecting.
Returns:
void
Limitations: For Connection types of CONN_TYPE_CLIENT and CONN_TYPE_SPECTATOR, use the AddOutgoingClient and AddOutgoingSpectator functions.

bool CGateway::AddPlayer PLAYER_TYPES  iType  ) 
 

FreePlayer.

Description:

Parameters:
kevin is a character string.
Returns:
void
Limitations:

void CGateway::FreePlayer PLAYER_TYPES  iType,
int32  iQuant = 1
 

FreePlayer.

Description:

Parameters:
kevin is a character string.
Returns:
void
Limitations:

int32 CGateway::GetConnectionCount CONNECTION_TYPES  iConnectionType  )  const
 

GetConnectionCount.

Description:

Parameters:
kevin is a character string.
Returns:
void
Limitations:

int32 CGateway::GetConnectionLimit CONNECTION_TYPES  iConnectionType  )  const
 

GetConnectionLimit.

Description:

Parameters:
kevin is a character string.
Returns:
void
Limitations:

int32 CGateway::GetPlayerCount PLAYER_TYPES  iPlayerType  )  const
 

GetPlayerCount.

Description:

Parameters:
kevin is a character string.
Returns:
void
Limitations:

int32 CGateway::GetPlayerLimit PLAYER_TYPES  iPlayerType  )  const
 

GetPlayerLimit.

Description:

Parameters:
kevin is a character string.
Returns:
void
Limitations:

bool CGateway::GetReadyPlayer GATEWAY_CONN_INFO connInfo  ) 
 

GetReadyPlayer.

Description:

Parameters:
kevin is a character string.
Returns:
void
Limitations:

void CGateway::PostAcceptance CMailbox pMbx  )  [protected]
 

PostAcceptance.

Description:

Parameters:
kevin is a character string.
Returns:
void
Limitations:

void CGateway::PostRejection CMailbox pMbx,
int32  iReason,
const char *  sReason
[protected]
 

PostRejection.

Description:

Parameters:
kevin is a character string.
Returns:
void
Limitations:

void CGateway::PostRequest CMailbox pMbx,
CONNECTION_REQUEST_BUFFER *  pReq
[protected]
 

PostRequest.

Description:

Parameters:
kevin is a character string.
Returns:
void
Limitations:

void CGateway::Process  ) 
 

Process.

Description:

Parameters:
kevin is a character string.
Returns:
void
Limitations:

bool CGateway::SetConnectionLimit CONNECTION_TYPES  iConnectionType,
int32  iLimit
 

SetConnectionLimit.

Description:

Parameters:
kevin is a character string.
Returns:
void
Limitations:

bool CGateway::SetPlayerLimit PLAYER_TYPES  iPlayerType,
int32  iLimit
 

SetPlayerLimit.

Description:

Parameters:
kevin is a character string.
Returns:
void
Limitations:

void CGateway::TryAuthenticate GATEWAY_CONN_INFO connInfo,
CMessage pMsg
[protected]
 

TryAuthenticate.

Description:

Parameters:
kevin is a character string.
Returns:
void
Limitations:

bool CGateway::ValidPlayerType int32  iType  )  const [inline, protected]
 

ValidType.

Description: This function validates a provided connection type. The valid connection types are defined in an enumeration in the caffeine.h header file.

Parameters:
iType - The numeric type value to validate.
Returns:
bool: True if the type is valid, else false.
Limitations: None


The documentation for this class was generated from the following files:
Copyright (c) 2005 Matt Bruns, Pat Hammond, Kevin Markussen, Travis Service, Brain Shaver

SourceForge.net Logo