2006 Copyright Filed by IT GlobalSecure, Inc. All Rights Reserved. Not to be used without authorization by Author. SecurePlay, IT GlobalSecure, and IT Armor are registered trademarks by IT GlobalSecure, Inc. Software protected by software license, and one or more the following U.S. and International patent numbers: U.S. Patent 6,030,288, U.S. Patent 6,165,072, European Patent Office EP1016049A1,and World Intellectual Property Organization WO9912135C1 and additional filings worldwide.
Main Page | Class Hierarchy | Class List | Class Members

SecurePlayLibrary::SPCGenericCommsServerClass Class Reference

#include <SPCGenericCommsServerClass.h>

Inheritance diagram for SecurePlayLibrary::SPCGenericCommsServerClass:

SecurePlayLibrary::SPAbstractCommsInterface List of all members.

Public Member Functions

 SPCGenericCommsServerClass (SPCGenericCommsDriverClass driver)
bool setcommsID (string cid)
bool addGame (string gid, SPCommsManagerCommsInterface game)
bool removeGame (string gid)
bool addPlayer (string gid, string pid)
bool removePlayer (string gid, string pid)
bool setGamePlayerAddress (string gid, string pid, string address, bool relay)
bool unsetGamePlayerAddress (string gid, string pid)
bool isReady ()
SPCGenericCommsDriverClass getCommsDriver ()
string getCommsID ()
string getCommsServiceType ()
SPMap getGameplayerList ()
string getPlayerAddress (string gid, string pid)
vector< string > getAddresses (string gid, vector< string > playerIDs)
vector< string > getPlayerList (string gid)
vector< string > getInternalGameIDList ()
string getOneInternalGameID ()
string getOneInternalPlayerID (string gid)
SPMap getPrinternalGameList ()
bool isGameInternal (string gid)
bool isAddressUsed (string address)
int includedPlayerCount (vector< string > playerarray, string gid)
void processincoming (SPMessageClass inmess)
int sendMessage (SPMessageClass clearmessage, SPMessageClass alternatemessage)
int sendMessage (vector< string > receivers, SPMessageClass clearmessage, SPMessageClass alternatemessage)
void SPdeserializeProcessDouble (vector< SPbyte > doubleMessages)
void SPdeserializeProcessMess (vector< SPbyte > messages)

Protected Member Functions

bool prreceive (SPMessageClass[] message)

Detailed Description

Generic Comms server class. This class is a generic comms server.
Author:
IT GlobalSecure
See also:
SecurePlay License Information


Constructor & Destructor Documentation

SPCGenericCommsServerClass::SPCGenericCommsServerClass SPCGenericCommsDriverClass  driver  ) 
 

Constructor


Member Function Documentation

bool SPCGenericCommsServerClass::addGame string  gid,
SPCommsManagerCommsInterface  game
 

This method adds an internal game to a specific comms service. The connection is to the SPComms class associated with the game to allow incoming messages to be serviced.

Parameters:
gid String - game id
game SPCommsManagerCommsInterface - the comms object to be added to a game
Returns:
boolean - TRUE, if successful, FALSE, if not

bool SPCGenericCommsServerClass::addPlayer string  gid,
string  pid
[virtual]
 

This method adds a player ID of a remote player serviced by this comm service.

Parameters:
pid String - player id to be added
gid String - game id for the player to be added
Returns:
boolean - TRUE, if successful, FALSE, if not

Implements SecurePlayLibrary::SPAbstractCommsInterface.

vector< string > SPCGenericCommsServerClass::getAddresses string  gid,
vector< string >  playerIDs
 

Returns a list of addresses that are associated with the player id list. NOTE: However this method considered the possibility that in one location there might be more than one player thus includes the address once avoiding multiple copies of messages sent to the same address or location.

Parameters:
gid 
playerIDs 
Returns:
String[]

SPCGenericCommsDriverClass SPCGenericCommsServerClass::getCommsDriver  ) 
 

Returns the comms driver.

Returns:
SPCGenericCommsDriverClass

string SPCGenericCommsServerClass::getCommsID  )  [virtual]
 

Gets the comms id.

Returns:
commsid - String - comms id.

Implements SecurePlayLibrary::SPAbstractCommsInterface.

string SPCGenericCommsServerClass::getCommsServiceType  )  [virtual]
 

This method returns a unique identifier for the type of comms service instance.

Returns:
String - unique identifier for type of comms service

Implements SecurePlayLibrary::SPAbstractCommsInterface.

SPMap SPCGenericCommsServerClass::getGameplayerList  )  [virtual]
 

Getter function that returns the property: gameplayerList

Returns:
gameplayerList - SPMap

Implements SecurePlayLibrary::SPAbstractCommsInterface.

vector< string > SPCGenericCommsServerClass::getInternalGameIDList  )  [virtual]
 

Getter function that returns the property: internalGameIDList

Returns:
internalGameIDList - String[]

Implements SecurePlayLibrary::SPAbstractCommsInterface.

string SPCGenericCommsServerClass::getOneInternalGameID  ) 
 

Returns the first game id of internal games. Used to send relay messages to indicate that the messages are from this location.

Returns:
String

string SPCGenericCommsServerClass::getOneInternalPlayerID string  gid  ) 
 

Returns the first player id of the specified game. Used with the method getOneInternalGameID() to send relay messages to indicate that the messages are from this location.

Parameters:
gid String - game id
Returns:
String

string SPCGenericCommsServerClass::getPlayerAddress string  gid,
string  pid
 

Gets the address of a player in a game.

Parameters:
gid String - game id
pid String - player id
Returns:
String

vector< string > SPCGenericCommsServerClass::getPlayerList string  gid  ) 
 

Gets the player list of a game.

Parameters:
gid String - game id.
Returns:
String[]

SPMap SPCGenericCommsServerClass::getPrinternalGameList  )  [virtual]
 

Getter function that returns the property: printernalGameList

Returns:
printernalGameList - SPMap

Implements SecurePlayLibrary::SPAbstractCommsInterface.

int SPCGenericCommsServerClass::includedPlayerCount vector< string >  playerarray,
string  gid
 

Checks to see how many players in the player id list are in the game.

Parameters:
playerarray String[] - player id list
gid String - game id.
Returns:
int

bool SPCGenericCommsServerClass::isAddressUsed string  address  ) 
 

Checks to see if the address is used by any player.

Parameters:
address String - the address to be checked.
Returns:
boolean

bool SPCGenericCommsServerClass::isGameInternal string  gid  )  [virtual]
 

This method returns whether a game is handled internally by a comms service

Parameters:
gid - String
Returns:
boolean - True if game is internal and supported by Comms Service

Implements SecurePlayLibrary::SPAbstractCommsInterface.

bool SPCGenericCommsServerClass::isReady  ) 
 

Goes through every player and checks to see if everyone has an address set.

Returns:
boolean

void SPCGenericCommsServerClass::processincoming SPMessageClass  inmess  ) 
 

This method processes the incoming message.

Parameters:
inmess SPMessageClass - the incoming message void

bool SPCGenericCommsServerClass::prreceive SPMessageClass[]  message  )  [protected]
 

This standard method handles incoming serialized messages that have been separated out of incoming data streams by the incoming method. It parses them into Message Objects and passes them on to the Game Instance.

Parameters:
message String - the incoming message
Returns:
result - Boolean: TRUE, if successfully handled, FALSE, if not.

bool SPCGenericCommsServerClass::removeGame string  gid  )  [virtual]
 

This method removes the association of a game with the comms service. NOTE: actually the association that is removed is with the game instance's SPComms class instance.

Parameters:
gid String - game id
Returns:
boolean - TRUE, if successful, FALSE, if not

Implements SecurePlayLibrary::SPAbstractCommsInterface.

bool SPCGenericCommsServerClass::removePlayer string  gid,
string  pid
[virtual]
 

This method removes a player from the list of remote players served by this comm service.

Parameters:
pid String - player id to ber removed.
gid String - game id from which the player is to be removed.
Returns:
result - Boolean: TRUE, if successful, FALSE, if not

Implements SecurePlayLibrary::SPAbstractCommsInterface.

int SPCGenericCommsServerClass::sendMessage vector< string >  receivers,
SPMessageClass  clearmessage,
SPMessageClass  alternatemessage
 

This method returns a number based on the input array to indicate how many of the input array's player IDs are included in the comms service playerIDList This method is depreceated and will be removed in a future version of the software (This method takes the message and sends it over the network, if they are served by this comms service.)

Parameters:
receivers String[] - array of playerIDs
clearmessage SPMessageClass - message for receivers
alternatemessage SPMessageClass - message or other game players
Returns:
integer - int - Number of remote players that were handled by this comm service for the message (or the number of players supported by the Comms Service in the input playerID array.)

int SPCGenericCommsServerClass::sendMessage SPMessageClass  clearmessage,
SPMessageClass  alternatemessage
 

This method returns a number based on the input array to indicate how many of the input array's player IDs are included in the comms service playerIDList (This method takes the message and sends it over the network, if they are served by this comms service.)

Parameters:
clearmessage SPMessageClass - message for receivers
alternatemessage SPMessageClass - message or other game players
Returns:
integer - int - Number of remote players that were handled by this comm service for the message (or the number of players supported by the Comms Service in the input playerID array.)

bool SPCGenericCommsServerClass::setcommsID string  cid  )  [virtual]
 

This method sets the internal ID for a comms service if it has not been set. NOTE, this ID is not the public, network, or other ID for the communications service, but simply an internal handler.

Parameters:
cid String - comms id
Returns:
boolean: TRUE, if succesful, FALSE, if not

Implements SecurePlayLibrary::SPAbstractCommsInterface.

bool SPCGenericCommsServerClass::setGamePlayerAddress string  gid,
string  pid,
string  address,
bool  relay
 

Sets a player of a game to an address.

Parameters:
gid String - game id
pid String - player id
address String - address
relay boolean - relay flag
Returns:
boolean

void SPCGenericCommsServerClass::SPdeserializeProcessDouble vector< SPbyte >  doubleMessages  ) 
 

Deserializes and processes double messages not single or multiple.

Parameters:
doubleMessages void

void SPCGenericCommsServerClass::SPdeserializeProcessMess vector< SPbyte >  messages  ) 
 

Deserializes amd processes multiple or single messages not doubple.

Parameters:
messages void

bool SPCGenericCommsServerClass::unsetGamePlayerAddress string  gid,
string  pid
 

Unsets an address of a player in a game.

Parameters:
gid String - game id
pid String - player id
Returns:
boolean


The documentation for this class was generated from the following files: 2006 Copyright Filed by IT GlobalSecure, Inc. All Rights Reserved. Not to be used without authorization by Author. SecurePlay, IT GlobalSecure, and IT Armor are registered trademarks by IT GlobalSecure, Inc. Software protected by software license, and one or more the following U.S. and International patent numbers: U.S. Patent 6,030,288, U.S. Patent 6,165,072, European Patent Office EP1016049A1,and World Intellectual Property Organization WO9912135C1 and additional filings worldwide.