doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
idMsgChannel Class Reference

#include <MsgChannel.h>

Public Member Functions

 idMsgChannel ()
 
void Init (const netadr_t adr, const int id)
 
void Shutdown (void)
 
void ResetRate (void)
 
void SetMaxOutgoingRate (int rate)
 
int GetMaxOutgoingRate (void)
 
netadr_t GetRemoteAddress (void) const
 
int GetOutgoingRate (void) const
 
int GetIncomingRate (void) const
 
float GetOutgoingCompression (void) const
 
float GetIncomingCompression (void) const
 
float GetIncomingPacketLoss (void) const
 
bool ReadyToSend (const int time) const
 
int SendMessage (idPort &port, const int time, const idBitMsg &msg)
 
void SendNextFragment (idPort &port, const int time)
 
bool UnsentFragmentsLeft (void) const
 
bool Process (const netadr_t from, int time, idBitMsg &msg, int &sequence)
 
bool SendReliableMessage (const idBitMsg &msg)
 
bool GetReliableMessage (idBitMsg &msg)
 
void ClearReliableMessages (void)
 

Private Member Functions

void WriteMessageData (idBitMsg &out, const idBitMsg &msg)
 
bool ReadMessageData (idBitMsg &out, const idBitMsg &msg)
 
void UpdateOutgoingRate (const int time, const int size)
 
void UpdateIncomingRate (const int time, const int size)
 
void UpdatePacketLoss (const int time, const int numReceived, const int numDropped)
 

Private Attributes

netadr_t remoteAddress
 
int id
 
int maxRate
 
idCompressorcompressor
 
int lastSendTime
 
int lastDataBytes
 
int outgoingRateTime
 
int outgoingRateBytes
 
int incomingRateTime
 
int incomingRateBytes
 
float outgoingCompression
 
float incomingCompression
 
float incomingReceivedPackets
 
float incomingDroppedPackets
 
int incomingPacketLossTime
 
int outgoingSequence
 
int incomingSequence
 
bool unsentFragments
 
int unsentFragmentStart
 
byte unsentBuffer [MAX_MESSAGE_SIZE]
 
idBitMsg unsentMsg
 
int fragmentSequence
 
int fragmentLength
 
byte fragmentBuffer [MAX_MESSAGE_SIZE]
 
idMsgQueue reliableSend
 
idMsgQueue reliableReceive
 

Detailed Description

Definition at line 88 of file MsgChannel.h.

Constructor & Destructor Documentation

idMsgChannel::idMsgChannel ( )

Definition at line 248 of file MsgChannel.cpp.

Member Function Documentation

void idMsgChannel::ClearReliableMessages ( void  )

Definition at line 705 of file MsgChannel.cpp.

float idMsgChannel::GetIncomingCompression ( void  ) const
inline

Definition at line 115 of file MsgChannel.h.

float idMsgChannel::GetIncomingPacketLoss ( void  ) const

Definition at line 785 of file MsgChannel.cpp.

int idMsgChannel::GetIncomingRate ( void  ) const
inline

Definition at line 109 of file MsgChannel.h.

int idMsgChannel::GetMaxOutgoingRate ( void  )
inline

Definition at line 100 of file MsgChannel.h.

float idMsgChannel::GetOutgoingCompression ( void  ) const
inline

Definition at line 112 of file MsgChannel.h.

int idMsgChannel::GetOutgoingRate ( void  ) const
inline

Definition at line 106 of file MsgChannel.h.

bool idMsgChannel::GetReliableMessage ( idBitMsg msg)

Definition at line 690 of file MsgChannel.cpp.

netadr_t idMsgChannel::GetRemoteAddress ( void  ) const
inline

Definition at line 103 of file MsgChannel.h.

void idMsgChannel::Init ( const netadr_t  adr,
const int  id 
)

Definition at line 259 of file MsgChannel.cpp.

bool idMsgChannel::Process ( const netadr_t  from,
int  time,
idBitMsg msg,
int sequence 
)

Definition at line 539 of file MsgChannel.cpp.

bool idMsgChannel::ReadMessageData ( idBitMsg out,
const idBitMsg msg 
)
private

Definition at line 366 of file MsgChannel.cpp.

bool idMsgChannel::ReadyToSend ( const int  time) const

Definition at line 315 of file MsgChannel.cpp.

void idMsgChannel::ResetRate ( void  )

Definition at line 301 of file MsgChannel.cpp.

int idMsgChannel::SendMessage ( idPort port,
const int  time,
const idBitMsg msg 
)

Definition at line 471 of file MsgChannel.cpp.

void idMsgChannel::SendNextFragment ( idPort port,
const int  time 
)

Definition at line 414 of file MsgChannel.cpp.

bool idMsgChannel::SendReliableMessage ( const idBitMsg msg)

Definition at line 670 of file MsgChannel.cpp.

void idMsgChannel::SetMaxOutgoingRate ( int  rate)
inline

Definition at line 97 of file MsgChannel.h.

void idMsgChannel::Shutdown ( void  )

Definition at line 291 of file MsgChannel.cpp.

bool idMsgChannel::UnsentFragmentsLeft ( void  ) const
inline

Definition at line 130 of file MsgChannel.h.

void idMsgChannel::UpdateIncomingRate ( const int  time,
const int  size 
)
private

Definition at line 745 of file MsgChannel.cpp.

void idMsgChannel::UpdateOutgoingRate ( const int  time,
const int  size 
)
private

Definition at line 715 of file MsgChannel.cpp.

void idMsgChannel::UpdatePacketLoss ( const int  time,
const int  numReceived,
const int  numDropped 
)
private

Definition at line 762 of file MsgChannel.cpp.

void idMsgChannel::WriteMessageData ( idBitMsg out,
const idBitMsg msg 
)
private

Definition at line 333 of file MsgChannel.cpp.

Member Data Documentation

idCompressor* idMsgChannel::compressor
private

Definition at line 151 of file MsgChannel.h.

byte idMsgChannel::fragmentBuffer[MAX_MESSAGE_SIZE]
private

Definition at line 185 of file MsgChannel.h.

int idMsgChannel::fragmentLength
private

Definition at line 184 of file MsgChannel.h.

int idMsgChannel::fragmentSequence
private

Definition at line 183 of file MsgChannel.h.

int idMsgChannel::id
private

Definition at line 149 of file MsgChannel.h.

float idMsgChannel::incomingCompression
private

Definition at line 165 of file MsgChannel.h.

float idMsgChannel::incomingDroppedPackets
private

Definition at line 169 of file MsgChannel.h.

int idMsgChannel::incomingPacketLossTime
private

Definition at line 170 of file MsgChannel.h.

int idMsgChannel::incomingRateBytes
private

Definition at line 161 of file MsgChannel.h.

int idMsgChannel::incomingRateTime
private

Definition at line 160 of file MsgChannel.h.

float idMsgChannel::incomingReceivedPackets
private

Definition at line 168 of file MsgChannel.h.

int idMsgChannel::incomingSequence
private

Definition at line 174 of file MsgChannel.h.

int idMsgChannel::lastDataBytes
private

Definition at line 155 of file MsgChannel.h.

int idMsgChannel::lastSendTime
private

Definition at line 154 of file MsgChannel.h.

int idMsgChannel::maxRate
private

Definition at line 150 of file MsgChannel.h.

float idMsgChannel::outgoingCompression
private

Definition at line 164 of file MsgChannel.h.

int idMsgChannel::outgoingRateBytes
private

Definition at line 159 of file MsgChannel.h.

int idMsgChannel::outgoingRateTime
private

Definition at line 158 of file MsgChannel.h.

int idMsgChannel::outgoingSequence
private

Definition at line 173 of file MsgChannel.h.

idMsgQueue idMsgChannel::reliableReceive
private

Definition at line 189 of file MsgChannel.h.

idMsgQueue idMsgChannel::reliableSend
private

Definition at line 188 of file MsgChannel.h.

netadr_t idMsgChannel::remoteAddress
private

Definition at line 148 of file MsgChannel.h.

byte idMsgChannel::unsentBuffer[MAX_MESSAGE_SIZE]
private

Definition at line 179 of file MsgChannel.h.

bool idMsgChannel::unsentFragments
private

Definition at line 177 of file MsgChannel.h.

int idMsgChannel::unsentFragmentStart
private

Definition at line 178 of file MsgChannel.h.

idBitMsg idMsgChannel::unsentMsg
private

Definition at line 180 of file MsgChannel.h.


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