Public Member Functions | Protected Member Functions

syncsys::SyncServerClient Class Reference

base class for a to the server connected client More...

#include <SyncSystem.h>

Inheritance diagram for syncsys::SyncServerClient:

List of all members.

Public Member Functions

 SyncServerClient (unsigned short StartUpdateMsg)
void IncreaseVersion (void)
 Increase the clientversion.
unsigned int GetVersion (void) const
 Getter for the clientversion.
bool PackData (helpers::NetworkBuffer &out_buffer, unsigned short &out_message)
 Packs data for the client.

Protected Member Functions

void SetUpdatePacketInfos (unsigned short Msg, const helpers::NetworkBuffer &buffer=helpers::NetworkBuffer())
 Setter for additional informations.

Detailed Description

base class for a to the server connected client

Representate a to the server connected client. Stores the changed NetEntities, packs them into a updatepacket and Sends it to the client.

Constructor & Destructor Documentation

syncsys::SyncServerClient::SyncServerClient ( unsigned short  StartUpdateMsg)


StartUpdateMsg,:sets UpdateMessage

Member Function Documentation

void syncsys::SyncServerClient::IncreaseVersion ( void  ) [inline]

Increase the clientversion.

If the clientsversions changes, NetEntities which update their clientlist will acknowledge this change and call NetEntity::ClientNeedsUpdates.

bool syncsys::SyncServerClient::PackData ( helpers::NetworkBuffer out_buffer,
unsigned short &  out_message 

Packs data for the client.

Checks if data need to be sent to the client. Collects the data, appends additional data and returns UpdateMessage and the Buffer if a update is needed. /return true = update needed => send the data

void syncsys::SyncServerClient::SetUpdatePacketInfos ( unsigned short  Msg,
const helpers::NetworkBuffer buffer = helpers::NetworkBuffer() 
) [inline, protected]

Setter for additional informations.

The updatepackets Send to the clients has the set Message and the additional data stored in the buffer will be append to the updatepacket. So the client can read the additional data after it has passed the updatepacket to UnPackData (which will only read the update data and shift the buffer after usage).

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