LLPacketRing Class Reference

#include <llpacketring.h>

Collaboration diagram for LLPacketRing:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLPacketRing ()
 ~LLPacketRing ()
void free ()
void dropPackets (U32)
void setDropPercentage (F32 percent_to_drop)
void setUseInThrottle (const BOOL use_throttle)
void setUseOutThrottle (const BOOL use_throttle)
void setInBandwidth (const F32 bps)
void setOutBandwidth (const F32 bps)
S32 receivePacket (S32 socket, char *datap)
S32 receiveFromRing (S32 socket, char *datap)
BOOL sendPacket (int h_socket, char *send_buffer, S32 buf_size, LLHost host)
LLHost getLastSender ()
S32 getAndResetActualInBits ()
S32 getAndResetActualOutBits ()

Protected Attributes

BOOL mUseInThrottle
BOOL mUseOutThrottle
LLThrottle mInThrottle
LLThrottle mOutThrottle
S32 mActualBitsIn
S32 mActualBitsOut
S32 mMaxBufferLength
S32 mInBufferLength
S32 mOutBufferLength
F32 mDropPercentage
U32 mPacketsToDrop
std::queue< LLPacketBuffer * > mReceiveQueue
std::queue< LLPacketBuffer * > mSendQueue
LLHost mLastSender

Detailed Description

Definition at line 45 of file llpacketring.h.


Constructor & Destructor Documentation

LLPacketRing::LLPacketRing (  ) 

Definition at line 44 of file llpacketring.cpp.

LLPacketRing::~LLPacketRing (  ) 

Definition at line 60 of file llpacketring.cpp.

References free().


Member Function Documentation

void LLPacketRing::dropPackets ( U32   ) 

Definition at line 86 of file llpacketring.cpp.

References mPacketsToDrop.

Referenced by drop_packet().

void LLPacketRing::free (  ) 

Definition at line 66 of file llpacketring.cpp.

References mReceiveQueue, and mSendQueue.

Referenced by ~LLPacketRing().

S32 LLPacketRing::getAndResetActualInBits (  )  [inline]

Definition at line 66 of file llpacketring.h.

References mActualBitsIn, and S32.

Referenced by LLWorld::updateNetStats().

S32 LLPacketRing::getAndResetActualOutBits (  )  [inline]

Definition at line 67 of file llpacketring.h.

References mActualBitsOut, and S32.

Referenced by LLWorld::updateNetStats().

LLHost LLPacketRing::getLastSender (  )  [inline]

Definition at line 92 of file llpacketring.h.

References mLastSender.

Referenced by LLMessageSystem::checkMessages(), and LLMessageSystem::dumpPacketToLog().

S32 LLPacketRing::receiveFromRing ( S32  socket,
char *  datap 
)

Definition at line 117 of file llpacketring.cpp.

References LLThrottle::checkOverflow(), f, LLPacketBuffer::getData(), LLPacketBuffer::getHost(), LLPacketBuffer::getSize(), mInBufferLength, mInThrottle, mLastSender, mReceiveQueue, NULL, S32, and LLThrottle::throttleOverflow().

Referenced by receivePacket().

S32 LLPacketRing::receivePacket ( S32  socket,
char *  datap 
)

Definition at line 153 of file llpacketring.cpp.

References f, FALSE, get_sender(), LLPacketBuffer::getSize(), ll_frand(), llendl, llwarns, mActualBitsIn, mDropPercentage, mInBufferLength, mLastSender, mMaxBufferLength, mPacketsToDrop, mReceiveQueue, mUseInThrottle, NULL, receive_packet(), receiveFromRing(), and S32.

Referenced by LLMessageSystem::checkMessages().

BOOL LLPacketRing::sendPacket ( int  h_socket,
char *  send_buffer,
S32  buf_size,
LLHost  host 
)

Definition at line 244 of file llpacketring.cpp.

References LLThrottle::checkOverflow(), f, LLHost::getAddress(), LLPacketBuffer::getData(), LLTimer::getElapsedTimeF32(), LLPacketBuffer::getHost(), LLHost::getPort(), LLPacketBuffer::getSize(), llendl, llinfos, llwarns, mActualBitsOut, mMaxBufferLength, mOutBufferLength, mOutThrottle, mSendQueue, mUseOutThrottle, NULL, LLTimer::reset(), S32, send_packet(), LLThrottle::throttleOverflow(), and TRUE.

Referenced by LLCircuitData::resendUnackedPackets(), and LLMessageSystem::sendMessage().

void LLPacketRing::setDropPercentage ( F32  percent_to_drop  ) 

Definition at line 92 of file llpacketring.cpp.

References mDropPercentage.

void LLPacketRing::setInBandwidth ( const F32  bps  ) 

Definition at line 107 of file llpacketring.cpp.

References mInThrottle, and LLThrottle::setRate().

void LLPacketRing::setOutBandwidth ( const F32  bps  ) 

Definition at line 112 of file llpacketring.cpp.

References mOutThrottle, and LLThrottle::setRate().

void LLPacketRing::setUseInThrottle ( const BOOL  use_throttle  ) 

Definition at line 97 of file llpacketring.cpp.

References mUseInThrottle.

void LLPacketRing::setUseOutThrottle ( const BOOL  use_throttle  ) 

Definition at line 102 of file llpacketring.cpp.

References mUseOutThrottle.


Member Data Documentation

S32 LLPacketRing::mActualBitsIn [protected]

Definition at line 76 of file llpacketring.h.

Referenced by getAndResetActualInBits(), and receivePacket().

S32 LLPacketRing::mActualBitsOut [protected]

Definition at line 77 of file llpacketring.h.

Referenced by getAndResetActualOutBits(), and sendPacket().

F32 LLPacketRing::mDropPercentage [protected]

Definition at line 82 of file llpacketring.h.

Referenced by receivePacket(), and setDropPercentage().

S32 LLPacketRing::mInBufferLength [protected]

Definition at line 79 of file llpacketring.h.

Referenced by receiveFromRing(), and receivePacket().

LLThrottle LLPacketRing::mInThrottle [protected]

Definition at line 73 of file llpacketring.h.

Referenced by receiveFromRing(), and setInBandwidth().

LLHost LLPacketRing::mLastSender [protected]

Definition at line 88 of file llpacketring.h.

Referenced by getLastSender(), receiveFromRing(), and receivePacket().

S32 LLPacketRing::mMaxBufferLength [protected]

Definition at line 78 of file llpacketring.h.

Referenced by receivePacket(), and sendPacket().

S32 LLPacketRing::mOutBufferLength [protected]

Definition at line 80 of file llpacketring.h.

Referenced by sendPacket().

LLThrottle LLPacketRing::mOutThrottle [protected]

Definition at line 74 of file llpacketring.h.

Referenced by sendPacket(), and setOutBandwidth().

U32 LLPacketRing::mPacketsToDrop [protected]

Definition at line 83 of file llpacketring.h.

Referenced by dropPackets(), and receivePacket().

std::queue<LLPacketBuffer *> LLPacketRing::mReceiveQueue [protected]

Definition at line 85 of file llpacketring.h.

Referenced by free(), receiveFromRing(), and receivePacket().

std::queue<LLPacketBuffer *> LLPacketRing::mSendQueue [protected]

Definition at line 86 of file llpacketring.h.

Referenced by free(), and sendPacket().

BOOL LLPacketRing::mUseInThrottle [protected]

Definition at line 69 of file llpacketring.h.

Referenced by receivePacket(), and setUseInThrottle().

BOOL LLPacketRing::mUseOutThrottle [protected]

Definition at line 70 of file llpacketring.h.

Referenced by sendPacket(), and setUseOutThrottle().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:33 2010 for Second Life Viewer by  doxygen 1.4.7