Torque2D Reference
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Types | Public Member Functions | List of all members
ConnectionStringTable Class Reference

#include <connectionStringTable.h>

Public Types

enum  Constants { EntryCount = 32, EntryBitSize = 5, InvalidEntryId = 32 }
 

Public Member Functions

 ConnectionStringTable (NetConnection *parent)
 
void confirmStringReceived (NetStringHandle &string, U32 index)
 Has the specified string been received on the other side? More...
 
U32 checkString (NetStringHandle &stringTableId, bool *stringOnOtherSide=NULL)
 
U32 getNetSendId (NetStringHandle &stringTableId)
 
void mapString (U32 netId, NetStringHandle &string)
 
NetStringHandle lookupString (U32 netId)
 
Demo functionality
void readDemoStartBlock (BitStream *stream)
 
void writeDemoStartBlock (ResizeBitStream *stream)
 

Detailed Description

Maintain a table of strings which are shared across the network.

This allows us to reference strings in our network streams more efficiently.

Member Enumeration Documentation

enum Constants
Enumerator
EntryCount 
EntryBitSize 
InvalidEntryId 

Constructor & Destructor Documentation

Initialize the connection string table.

Parameters
parentConnection over which we are maintaining this string table.

Member Function Documentation

U32 checkString ( NetStringHandle stringTableId,
bool *  stringOnOtherSide = NULL 
)

Checks if the global string ID is

void confirmStringReceived ( NetStringHandle string,
U32  index 
)
inline

Has the specified string been received on the other side?

U32 getNetSendId ( NetStringHandle stringTableId)

currently valid for this connection and returns the table ID. Sends a string event to the other side if it is not active. It will fill in stringOnOtherSide. Same return value as checkString

NetStringHandle lookupString ( U32  netId)
inline

was just sent over the net to the corresponding net ID.

the global string table ID for that string.

Parameters
netIdlooks up the string ID and returns
void mapString ( U32  netId,
NetStringHandle string 
)

but will assert if the string is not valid. Maps a string that

void readDemoStartBlock ( BitStream stream)
void writeDemoStartBlock ( ResizeBitStream stream)

The documentation for this class was generated from the following files: