News SF.net Project Frequently Asked Questions Documentation Downloads Mailing Lists How to Contribute

SourceForge.net Logo

Changing the way games are made and played.

TNL::ClientPuzzleManager::NonceTable class Reference

TNL::ClientPuzzleManager::NonceTable Class Reference


Detailed Description

NonceTable manages the list of client nonces for which clients have constructed valid puzzle solutions for the current server nonce.

There are 2 nonce tables in the ClientPuzzleManager - one for the current nonce and one for the previous nonce.


Public Member Functions

 NonceTable ()
 NonceTable constructor.

void reset ()
 Resets and clears the nonce table.

bool checkAdd (Nonce &theNonce)
 checks if the given nonce is already in the table and adds it if it is not.


Private Types

enum  {
  MinHashTableSize = 127,
  MaxHashTableSize = 387
}

Private Attributes

Entry ** mHashTable
U32 mHashTableSize
DataChunker mChunker


Member Enumeration Documentation

anonymous enum [private]
 

Enumeration values:
MinHashTableSize 
MaxHashTableSize 


Constructor & Destructor Documentation

TNL::ClientPuzzleManager::NonceTable::NonceTable  )  [inline]
 

NonceTable constructor.


Member Function Documentation

void TNL::ClientPuzzleManager::NonceTable::reset  ) 
 

Resets and clears the nonce table.

bool TNL::ClientPuzzleManager::NonceTable::checkAdd Nonce theNonce  ) 
 

checks if the given nonce is already in the table and adds it if it is not.

Returns true if the nonce was not in the table when the function was called.


Field Documentation

Entry** TNL::ClientPuzzleManager::NonceTable::mHashTable [private]
 

U32 TNL::ClientPuzzleManager::NonceTable::mHashTableSize [private]
 

DataChunker TNL::ClientPuzzleManager::NonceTable::mChunker [private]