Torque2D Reference
Loading...
Searching...
No Matches
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?
 
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

◆ Constants

enum Constants
Enumerator
EntryCount 
EntryBitSize 
InvalidEntryId 

Constructor & Destructor Documentation

◆ ConnectionStringTable()

Initialize the connection string table.

Parameters
parentConnection over which we are maintaining this string table.

Member Function Documentation

◆ checkString()

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

Checks if the global string ID is

◆ confirmStringReceived()

void confirmStringReceived ( NetStringHandle string,
U32  index 
)
inline

Has the specified string been received on the other side?

◆ getNetSendId()

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

◆ lookupString()

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

◆ mapString()

void mapString ( U32  netId,
NetStringHandle string 
)

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

◆ readDemoStartBlock()

void readDemoStartBlock ( BitStream stream)

◆ writeDemoStartBlock()

void writeDemoStartBlock ( ResizeBitStream stream)

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