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

#include <gameConnection.h>

+ Inheritance diagram for GameConnection:

Classes

struct  GamePacketNotify
 

Public Types

enum  Constants { GameConnectionBlockTypeCount, MaxConnectArgs = 16 }
 Configuration. More...
 
- Public Types inherited from NetConnection
enum  Constants { HashTableSize = 127 }
 
enum  NetConnectionFlags { ConnectionToServer = BIT(0), ConnectionToClient = BIT(1), LocalClientConnection = BIT(2), NetworkConnection = BIT(3) }
 
enum  NetConnectionState {
  NotConnected, AwaitingChallengeResponse, AwaitingConnectRequest, AwaitingConnectResponse,
  Connected
}
 
enum  GhostConstants { GhostIdBitSize = 12, MaxGhostCount = 1 << GhostIdBitSize, GhostLookupTableSize = 1 << GhostIdBitSize, GhostIndexBitSize = 4 }
 Some configuration values. More...
 
enum  DemoBlockTypes { BlockTypePacket, BlockTypeSendPacket, NetConnectionBlockTypeCount }
 
enum  DemoConstants { MaxNumBlockTypes = 16, MaxBlockSize = 0x1000 }
 

Public Member Functions

void setConnectArgs (U32 argc, const char **argv)
 Set connection arguments; these are passed to the server when we connect. More...
 
void setJoinPassword (const char *password)
 Set the server password to use when we join. More...
 
bool canRemoteCreate ()
 
 DECLARE_CONOBJECT (GameConnection)
 
void handleConnectionMessage (U32 message, U32 sequence, U32 ghostCount)
 
void setDisconnectReason (const char *reason)
 
 GameConnection ()
 
 ~GameConnection ()
 
bool onAdd ()
 Called when the object is added to the sim. More...
 
void onRemove ()
 Called when the object is removed from the sim. More...
 
void detectLag ()
 
Event Handling
virtual void onTimedOut ()
 
virtual void onConnectTimedOut ()
 
virtual void onDisconnect (const char *reason)
 
virtual void onConnectionRejected (const char *reason)
 
virtual void onConnectionEstablished (bool isInitiator)
 
virtual void handleStartupError (const char *errorString)
 
Authentication

This is remnant code from Tribes 2.

void setAuthInfo (const AuthInfo *info)
 
const AuthInfogetAuthInfo ()
 
- Public Member Functions inherited from NetConnection
void sendDisconnectPacket (const char *reason)
 
void connect (const NetAddress *address)
 
U32 getNetClassGroup ()
 
void setSimulatedNetParams (F32 packetLoss, U32 ping)
 
bool isConnectionToServer ()
 
bool isLocalConnection ()
 
bool isNetworkConnection ()
 
void setIsConnectionToServer ()
 
void setIsLocalClientConnection ()
 
void setNetworkConnection (bool net)
 
virtual void setEstablished ()
 
void setRemoteConnectionObject (NetConnection *connection)
 Call this if the "connection" is local to this app. This short-circuits the protocol layer. More...
 
void setSequence (U32 connectSequence)
 
void setAddressDigest (U32 digest[4])
 
void getAddressDigest (U32 digest[4])
 
U32 getSequence ()
 
void setProtocolVersion (U32 protocolVersion)
 
U32 getProtocolVersion ()
 
F32 getRoundTripTime ()
 
F32 getPacketLoss ()
 
void checkMaxRate ()
 
void handlePacket (BitStream *stream)
 
void processRawPacket (BitStream *stream)
 
void handleNotify (bool recvd)
 
void handleConnectionEstablished ()
 
void keepAlive ()
 
const NetAddressgetNetAddress ()
 
void setNetAddress (const NetAddress *address)
 
Net::Error sendPacket (BitStream *stream)
 
bool checkTimeout (U32 time)
 returns true if the connection timed out More...
 
void checkPacketSend (bool force)
 
bool missionPathsSent () const
 
void setMissionPathsSent (const bool s)
 
void onRemove ()
 Called when the object is removed from the sim. More...
 
 NetConnection ()
 
 ~NetConnection ()
 
void setConnectionState (U32 state)
 
U32 getConnectionState ()
 
void setGhostFrom (bool ghostFrom)
 Sets whether ghosts transmit from this side of the connection. More...
 
void setGhostTo (bool ghostTo)
 Sets whether ghosts are allowed from the other side of the connection. More...
 
void setSendingEvents (bool sending)
 Sets whether this side actually sends the events that are posted to it. More...
 
void setTranslatesStrings (bool xl)
 Sets whether this connection is capable of translating strings. More...
 
void setNetClassGroup (U32 group)
 Sets the group of NetClasses this connection traffics in. More...
 
bool isEstablished ()
 Is the connection established? More...
 
 DECLARE_CONOBJECT (NetConnection)
 
U32 getGhostsActive ()
 
bool isGhostingTo ()
 Are we ghosting to someone? More...
 
bool isGhostingFrom ()
 Are we ghosting from someone? More...
 
void ghostOnRemove ()
 Called by onRemove, to shut down the ghost subsystem. More...
 
virtual void doneScopingScene ()
 
void setScopeObject (NetObject *object)
 Set the object around which we are currently scoping network traffic. More...
 
NetObjectgetScopeObject ()
 Get the object aorund which we are currently scoping network traffic. More...
 
void objectInScope (NetObject *object)
 Add an object to scope. More...
 
void objectLocalScopeAlways (NetObject *object)
 Add an object to scope, marking that it should always be scoped to this connection. More...
 
void objectLocalClearAlways (NetObject *object)
 
NetObjectresolveGhost (S32 id)
 Get a NetObject* from a ghost ID (on client side). More...
 
NetObjectresolveObjectFromGhostIndex (S32 id)
 Get a NetObject* from a ghost index (on the server side). More...
 
S32 getGhostIndex (NetObject *object)
 
void ghostPushNonZero (GhostInfo *gi)
 Move a GhostInfo into the nonzero portion of the list (so that we know to update it). More...
 
void ghostPushToZero (GhostInfo *gi)
 Move a GhostInfo into the zero portion of the list (so that we know not to update it). More...
 
void ghostPushZeroToFree (GhostInfo *gi)
 Move a GhostInfo from the zero portion of the list to the free portion. More...
 
void ghostPushFreeToZero (GhostInfo *info)
 Move a GhostInfo from the free portion of the list to the zero portion. More...
 
void resetGhosting ()
 
void activateGhosting ()
 Activate ghosting, once it's enabled. More...
 
bool isGhosting ()
 Are we ghosting? More...
 
void detachObject (GhostInfo *info)
 Begin to stop ghosting an object. More...
 
void setGhostAlwaysObject (NetObject *object, U32 index)
 Mark an object to be always ghosted. Index is the ghost index of the object. More...
 
void sendConnectionMessage (U32 message, U32 sequence=0, U32 ghostCount=0)
 
bool isRecording ()
 
bool isPlayingBack ()
 
U32 getNextBlockType ()
 
void recordBlock (U32 type, U32 size, void *data)
 
virtual void handleRecordedBlock (U32 type, U32 size, void *data)
 
bool processNextBlock ()
 
bool startDemoRecord (const char *fileName)
 
bool replayDemoRecord (const char *fileName)
 
void startDemoRead ()
 
void stopRecording ()
 
void stopDemoPlayback ()
 
virtual void writeDemoStartBlock (ResizeBitStream *stream)
 
virtual bool readDemoStartBlock (BitStream *stream)
 
virtual void demoPlaybackComplete ()
 
bool postNetEvent (NetEvent *event)
 Post an event to this connection. More...
 
NetConnectiongetNext ()
 
void mapString (U32 netId, NetStringHandle &string)
 
U32 checkString (NetStringHandle &string, bool *isOnOtherSide=NULL)
 
U32 getNetSendId (NetStringHandle &string)
 
void confirmStringReceived (NetStringHandle &string, U32 index)
 
NetStringHandle translateRemoteStringId (U32 id)
 
void validateSendString (const char *str)
 
void packString (BitStream *stream, const char *str)
 
void unpackString (BitStream *stream, char readBuffer[1024])
 
void packNetStringHandleU (BitStream *stream, NetStringHandle &h)
 
NetStringHandle unpackNetStringHandleU (BitStream *stream)
 
bool startSendingFile (const char *fileName)
 Start sending the specified file over the link. More...
 
void chunkReceived (U8 *chunkData, U32 chunkLen)
 Called when we receive a FileChunkEvent. More...
 
void sendNextFileDownloadRequest ()
 Get the next file... More...
 
void sendFileChunk ()
 Post the next FileChunkEvent. More...
 
virtual void fileDownloadSegmentComplete ()
 Called when we finish downloading file data. More...
 
void loadNextGhostAlwaysObject (bool hadNewFiles)
 
- Public Member Functions inherited from ConnectionProtocol
 ConnectionProtocol ()
 
void buildSendPacketHeader (BitStream *bstream, S32 packetType=0)
 
void sendPingPacket ()
 
void sendAckPacket ()
 
void setConnectionEstablished ()
 
bool windowFull ()
 
bool connectionEstablished ()
 
void setConnectSequence (U32 connectSeq)
 
- Public Member Functions inherited from SimGroup
 ~SimGroup ()
 
virtual void addObject (SimObject *)
 Add an object to the group. More...
 
void addObject (SimObject *, SimObjectId)
 
void addObject (SimObject *, const char *name)
 
virtual void removeObject (SimObject *)
 Remove an object from the group. More...
 
virtual SimObjectfindObject (const char *name)
 Find an object in the group. More...
 
bool processArguments (S32 argc, const char **argv)
 Process constructor options. (ie, new SimObject(1,2,3)) More...
 
 DECLARE_CONOBJECT (SimGroup)
 
- Public Member Functions inherited from SimSet
 SimSet ()
 
 ~SimSet ()
 
virtual void onDeleteNotify (SimObject *object)
 
virtual U32 getTamlChildCount (void) const
 Called when Taml attempts to compile a list of children. More...
 
virtual SimObjectgetTamlChild (const U32 childIndex) const
 Called when Taml attempts to compile a list of children. More...
 
virtual void addTamlChild (SimObject *pSimObject)
 Called when Taml attempts to populate an objects children during a read. More...
 
void callOnChildren (const char *method, S32 argc, const char *argv[], bool executeOnChildGroups=true)
 
virtual void write (Stream &stream, U32 tabStop, U32 flags=0)
 
SimObjectfindObjectByInternalName (const char *internalName, bool searchChildren=false)
 
virtual bool writeObject (Stream *stream)
 
virtual bool readObject (Stream *stream)
 
void lock ()
 
void unlock ()
 
 DECLARE_CONOBJECT (SimSet)
 
void _setVectorAssoc (const char *file, const U32 line)
 
virtual void pushObject (SimObject *)
 
virtual void popObject ()
 Remove an object from the end of the list. More...
 
void bringObjectToFront (SimObject *obj)
 
void pushObjectToBack (SimObject *obj)
 
SimObjectfront ()
 
SimObjectfirst ()
 
SimObjectlast ()
 
bool empty ()
 
S32 size () const
 
iterator begin ()
 
iterator end ()
 
value operator[] (S32 index)
 
iterator find (iterator first, iterator last, SimObject *obj)
 
iterator find (SimObject *obj)
 
template<typename T >
bool containsType (void)
 
virtual bool reOrder (SimObject *obj, SimObject *target=0)
 
SimObjectat (S32 index) const
 
void deleteObjects (void)
 
void clear ()
 
- Public Member Functions inherited from SimObject
StringTableEntry getClassNamespace () const
 
StringTableEntry getSuperClassNamespace () const
 
void setClassNamespace (const char *classNamespace)
 
void setSuperClassNamespace (const char *superClassNamespace)
 
void pushScriptCallbackGuard (void)
 
void popScriptCallbackGuard (void)
 
S32 getScriptCallbackGuard (void)
 
NamespacegetNamespace ()
 Return the object's namespace. More...
 
const char * tabComplete (const char *prevText, S32 baseLen, bool)
 
virtual void dump ()
 
virtual void dumpClassHierarchy ()
 
SimObjectclone (const bool copyDynamicFields)
 
virtual void copyTo (SimObject *object)
 
template<typename T >
bool isType (void)
 
virtual bool handlesConsoleMethod (const char *fname, S32 *routingId)
 
 DECLARE_CONOBJECT (SimObject)
 
NotifyremoveNotify (void *ptr, Notify::Type)
 Remove a notification from the list. More...
 
void deleteNotify (SimObject *obj)
 Notify an object when we are deleted. More...
 
void clearNotify (SimObject *obj)
 Notify an object when we are cleared. More...
 
void clearAllNotifications ()
 Remove all notifications for this object. More...
 
void processDeleteNotifies ()
 Send out deletion notifications. More...
 
void registerReference (SimObject **obj)
 
void unregisterReference (SimObject **obj)
 
const char * getDataField (StringTableEntry slotName, const char *array)
 
void setDataField (StringTableEntry slotName, const char *array, const char *value)
 
const char * getPrefixedDataField (StringTableEntry fieldName, const char *array)
 
void setPrefixedDataField (StringTableEntry fieldName, const char *array, const char *value)
 
const char * getPrefixedDynamicDataField (StringTableEntry fieldName, const char *array, const S32 fieldType=-1)
 
void setPrefixedDynamicDataField (StringTableEntry fieldName, const char *array, const char *value, const S32 fieldType=-1)
 
StringTableEntry getDataFieldPrefix (StringTableEntry fieldName)
 
U32 getDataFieldType (StringTableEntry slotName, const char *array)
 
SimFieldDictionarygetFieldDictionary ()
 
void clearDynamicFields (void)
 Clear all dynamic fields. More...
 
void setCanSaveDynamicFields (bool bCanSave)
 Set whether fields created at runtime should be saved. Default is true. More...
 
bool getCanSaveDynamicFields (void) const
 Get whether fields created at runtime should be saved. Default is true. More...
 
void setInternalName (const char *newname)
 
StringTableEntry getInternalName ()
 Get the internal of of this control. More...
 
virtual bool save (const char *pcFilePath, bool bOnlySelected=false)
 Save object as a TorqueScript File. More...
 
virtual bool isMethod (const char *methodName)
 Check if a method exists in the objects current namespace. More...
 
SimObjectId getId (void) const
 
StringTableEntry getIdString (void) const
 
U32 getType () const
 
const StringTableEntry getName (void) const
 
void setId (SimObjectId id)
 
void assignName (const char *name)
 
SimGroupgetGroup () const
 
bool isChildOfGroup (SimGroup *pGroup)
 
bool isProperlyAdded () const
 
bool isDeleted () const
 
bool isRemoved () const
 
bool isLocked ()
 
void setLocked (bool b)
 
bool isHidden ()
 
void setHidden (bool b)
 
void setProgenitorFile (const char *pFile)
 
StringTableEntry getProgenitorFile (void) const
 
void setPeriodicTimerID (const S32 timerID)
 
S32 getPeriodicTimerID (void) const
 
bool isPeriodicTimerActive (void) const
 
bool isSelected () const
 
bool isExpanded () const
 
void setSelected (bool sel)
 
void setExpanded (bool exp)
 
void setModDynamicFields (bool dyn)
 
void setModStaticFields (bool sta)
 
 SimObject (const U8 namespaceLinkMask=LinkSuperClassName|LinkClassName)
 
virtual ~SimObject ()
 
virtual void onGroupAdd ()
 Called when the object is added to a SimGroup. More...
 
virtual void onGroupRemove ()
 Called when the object is removed from a SimGroup. More...
 
virtual void onNameChange (const char *name)
 Called when the object's name is changed. More...
 
virtual void onStaticModified (const char *slotName, const char *newValue=NULL)
 
virtual void inspectPreApply ()
 
virtual void inspectPostApply ()
 
virtual void onEditorEnable ()
 Called when the editor is activated. More...
 
virtual void onEditorDisable ()
 Called when the editor is deactivated. More...
 
bool registerObject ()
 
bool registerObject (U32 id)
 
bool registerObject (const char *name)
 
bool registerObject (const char *name, U32 id)
 
void unregisterObject ()
 
void deleteObject ()
 
bool addToSet (SimObjectId)
 
bool addToSet (const char *)
 
bool removeFromSet (SimObjectId)
 
bool removeFromSet (const char *)
 
virtual bool writeField (StringTableEntry fieldname, const char *value)
 
virtual void writeFields (Stream &stream, U32 tabStop)
 
virtual void buildFilterList ()
 
void addFieldFilter (const char *fieldName)
 
void removeFieldFilter (const char *fieldName)
 
void clearFieldFilters ()
 
bool isFiltered (const char *fieldName)
 
void assignFieldsFrom (SimObject *obj)
 
void assignDynamicFieldsFrom (SimObject *obj)
 
- Public Member Functions inherited from ConsoleObject
const AbstractClassRep::FieldfindField (StringTableEntry fieldName) const
 Get a reference to a field by name. More...
 
virtual AbstractClassRepgetClassRep () const
 Gets the ClassRep. More...
 
bool setField (const char *fieldName, const char *value)
 Set the value of a field. More...
 
virtual ~ConsoleObject ()
 
const AbstractClassRep::FieldListgetFieldList () const
 Get a list of all the fields. This information cannot be modified. More...
 
AbstractClassRep::FieldListgetModifiableFieldList ()
 
bool & getDynamicGroupExpand ()
 
S32 getClassId (U32 netClassGroup) const
 
const char * getClassName () const
 

Static Public Member Functions

static void consoleInit ()
 
static GameConnectiongetServerConnection ()
 
static GameConnectiongetLocalClientConnection ()
 
- Static Public Member Functions inherited from NetConnection
static NetConnectiongetConnectionToServer ()
 
static NetConnectiongetLocalClientConnection ()
 
static void setLocalClientConnection (NetConnection *conn)
 
static bool filesWereDownloaded ()
 
static char * getErrorBuffer ()
 
static void setLastError (const char *fmt,...)
 
static NetConnectionlookup (const NetAddress *remoteAddress)
 Find a NetConnection, if any, with the specified address. More...
 
static void consoleInit ()
 
static NetConnectiongetConnectionList ()
 

Static Public Attributes

Protocol Versions

Protocol versions are used to indicated changes in network traffic. These could be changes in how any object transmits or processes network information. You can specify backwards compatability by specifying a MinRequireProtocolVersion. If the client protocol is >= this min value, the connection is accepted.

Torque (V12) SDK 1.0 uses protocol = 1

Torque SDK 1.1 uses protocol = 2

static const U32 CurrentProtocolVersion = 12
 
static const U32 MinRequiredProtocolVersion = 12
 
- Static Public Attributes inherited from NetConnection
static char mErrorBuffer [256]
 

Protected Member Functions

PacketNotifyallocNotify ()
 
- Protected Member Functions inherited from NetConnection
void clearGhostInfo ()
 
bool validateGhostArray ()
 
void ghostPacketDropped (PacketNotify *notify)
 
void ghostPacketReceived (PacketNotify *notify)
 
void ghostWritePacket (BitStream *bstream, PacketNotify *notify)
 
void ghostReadPacket (BitStream *bstream)
 
void freeGhostInfo (GhostInfo *)
 
void ghostWriteStartBlock (ResizeBitStream *stream)
 
void ghostReadStartBlock (BitStream *stream)
 

Protected Attributes

AuthInfomAuthInfo
 
S32 mLastPacketTime
 
bool mLagging
 
- Protected Attributes inherited from NetConnection
U32 mConnectSendCount
 
U32 mConnectLastSendTime
 
GhostInfo ** mGhostArray
 Linked list of ghostInfos ghosted by this side of the connection. More...
 
U32 mGhostZeroUpdateIndex
 Index in mGhostArray of first ghost with 0 update mask. More...
 
U32 mGhostFreeIndex
 Index in mGhostArray of first free ghost. More...
 
U32 mGhostsActive
 
bool mGhosting
 Am I currently ghosting objects? More...
 
bool mScoping
 am I currently scoping objects? More...
 
U32 mGhostingSequence
 Sequence number describing this ghosting session. More...
 
NetObject ** mLocalGhosts
 
GhostInfomGhostRefs
 Allocated array of ghostInfos. Null if ghostFrom is false. More...
 
GhostInfo ** mGhostLookupTable
 Table indexed by object id to GhostInfo. Null if ghostFrom is false. More...
 
SimObjectPtr< NetObjectmScopeObject
 
Vector< char * > mMissingFileList
 
StreammCurrentDownloadingFile
 Stream for currently uploading file (if any). More...
 
void * mCurrentFileBuffer
 Storage for currently downloading file. More...
 
U32 mCurrentFileBufferSize
 Size of currently downloading file in bytes. More...
 
U32 mCurrentFileBufferOffset
 Our position in the currently downloading file in bytes. More...
 
U32 mNumDownloadedFiles
 Number of files we have downloaded. More...
 
char mLastFileErrorBuffer [256]
 Error storage for file transfers. More...
 
Vector< GhostSavemGhostAlwaysSaveList
 List of objects to ghost-always. More...
 
- Protected Attributes inherited from ConnectionProtocol
U32 mLastSeqRecvdAtSend [32]
 
U32 mLastSeqRecvd
 
U32 mHighestAckedSeq
 
U32 mLastSendSeq
 
U32 mAckMask
 
U32 mConnectSequence
 
U32 mLastRecvAckAck
 
bool mConnectionEstablished
 

Static Protected Attributes

static S32 mLagThresholdMS = 0
 
- Static Protected Attributes inherited from NetConnection
static SimObjectPtr
< NetConnection
mServerConnection
 
static SimObjectPtr
< NetConnection
mLocalClientConnection
 
static bool mFilesWereDownloaded = false
 

Packet I/O

virtual void writeConnectRequest (BitStream *stream)
 
virtual bool readConnectRequest (BitStream *stream, const char **errorString)
 
virtual void writeConnectAccept (BitStream *stream)
 
virtual bool readConnectAccept (BitStream *stream, const char **errorString)
 
void readPacket (BitStream *bstream)
 
void writePacket (BitStream *bstream, PacketNotify *note)
 
void packetReceived (PacketNotify *note)
 
void packetDropped (PacketNotify *note)
 
void connectionError (const char *errorString)
 

Additional Inherited Members

- Public Attributes inherited from NetConnection
U32 mConnectionSendCount
 number of connection messages we've sent. More...
 
U32 mConnectionState
 State of the connection, from NetConnectionState. More...
 
PacketNotifymNotifyQueueHead
 Head of packet notify list. More...
 
PacketNotifymNotifyQueueTail
 Tail of packet notify list. More...
 
- Protected Types inherited from NetConnection
enum  GhostStates {
  GhostAlwaysDone, ReadyForNormalGhosts, EndGhosting, GhostAlwaysStarting,
  SendNextDownloadRequest, FileDownloadSizeMessage, NumConnectionMessages
}
 
- Protected Types inherited from SimObject
enum  SimObjectNSLinkType { LinkClassName = BIT(0), LinkSuperClassName = BIT(1) }
 
- Static Protected Member Functions inherited from SimObject
static bool setClass (void *obj, const char *data)
 
static bool setSuperClass (void *obj, const char *data)
 
static bool writeCanSaveDynamicFields (void *obj, StringTableEntry pFieldName)
 
static bool writeInternalName (void *obj, StringTableEntry pFieldName)
 
static bool setParentGroup (void *obj, const char *data)
 
static bool writeParentGroup (void *obj, StringTableEntry pFieldName)
 
static bool writeSuperclass (void *obj, StringTableEntry pFieldName)
 
static bool writeClass (void *obj, StringTableEntry pFieldName)
 
static SimObject::NotifyallocNotify ()
 Get a free Notify structure. More...
 
static void freeNotify (SimObject::Notify *)
 Mark a Notify structure as free. More...
 

Member Enumeration Documentation

enum Constants

Configuration.

Enumerator
GameConnectionBlockTypeCount 
MaxConnectArgs 

Constructor & Destructor Documentation

Member Function Documentation

NetConnection::PacketNotify * allocNotify ( )
protectedvirtual

Reimplemented from NetConnection.

bool canRemoteCreate ( )
virtual

Reimplemented from NetConnection.

void connectionError ( const char *  errorString)
protectedvirtual

Reimplemented from NetConnection.

void consoleInit ( )
static
DECLARE_CONOBJECT ( GameConnection  )
void detectLag ( )
const AuthInfo * getAuthInfo ( )
static GameConnection* getLocalClientConnection ( )
inlinestatic
static GameConnection* getServerConnection ( )
inlinestatic
void handleConnectionMessage ( U32  message,
U32  sequence,
U32  ghostCount 
)
virtual

Handle message from sendConnectionMessage().

This is called to handle messages sent via sendConnectionMessage.

Parameters
messageOne of GhostStates
sequenceA sequence number, if any.
ghostCountA count of ghosts relating to this message.

Reimplemented from NetConnection.

void handleStartupError ( const char *  errorString)
virtual

Reimplemented from NetConnection.

bool onAdd ( void  )
virtual

Called when the object is added to the sim.

Reimplemented from SimObject.

void onConnectionEstablished ( bool  isInitiator)
virtual

Reimplemented from NetConnection.

void onConnectionRejected ( const char *  reason)
virtual

Reimplemented from NetConnection.

void onConnectTimedOut ( )
virtual

Reimplemented from NetConnection.

void onDisconnect ( const char *  reason)
virtual

Reimplemented from NetConnection.

void onRemove ( )
virtual

Called when the object is removed from the sim.

Reimplemented from SimGroup.

void onTimedOut ( )
virtual

Reimplemented from NetConnection.

void packetDropped ( PacketNotify note)
protectedvirtual

Reimplemented from NetConnection.

void packetReceived ( PacketNotify note)
protectedvirtual

Reimplemented from NetConnection.

bool readConnectAccept ( BitStream stream,
const char **  errorString 
)
virtual

Reimplemented from NetConnection.

bool readConnectRequest ( BitStream stream,
const char **  errorString 
)
virtual

Reimplemented from NetConnection.

void readPacket ( BitStream bstream)
protectedvirtual

Reimplemented from NetConnection.

void setAuthInfo ( const AuthInfo info)
void setConnectArgs ( U32  argc,
const char **  argv 
)

Set connection arguments; these are passed to the server when we connect.

void setDisconnectReason ( const char *  reason)
void setJoinPassword ( const char *  password)

Set the server password to use when we join.

void writeConnectAccept ( BitStream stream)
virtual

Reimplemented from NetConnection.

void writeConnectRequest ( BitStream stream)
virtual

Reimplemented from NetConnection.

void writePacket ( BitStream bstream,
PacketNotify note 
)
protectedvirtual

Reimplemented from NetConnection.

Member Data Documentation

const U32 CurrentProtocolVersion = 12
static
AuthInfo* mAuthInfo
protected
const U32 MinRequiredProtocolVersion = 12
static
bool mLagging
protected
S32 mLagThresholdMS = 0
staticprotected
S32 mLastPacketTime
protected

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