KVIrc  4.9.2
DeveloperAPIs
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
DccSendThread Class Reference

#include <DccFileTransfer.h>

+ Inheritance diagram for DccSendThread:

Public Member Functions

quint64 ackedBytes ()
 
uint averageSpeed ()
 
unsigned int bandwidthLimit ()
 
 DccSendThread (QObject *par, kvi_socket_t fd, KviDccSendThreadOptions *opt)
 
void doneGetInfo ()
 
quint64 filePosition ()
 
void initGetInfo ()
 
uint instantSpeed ()
 
quint64 sentBytes ()
 
void setBandwidthLimit (unsigned int uMaxBandwidth)
 
 ~DccSendThread ()
 
- Public Member Functions inherited from DccThread
 DccThread (QObject *par, kvi_socket_t fd)
 
QObject * parent ()
 
void postErrorEvent (int err)
 
void postMessageEvent (const char *message)
 
 ~DccThread ()
 
- Public Member Functions inherited from KviSensitiveThread
void enqueueEvent (KviThreadEvent *e)
 
 KviSensitiveThread ()
 
void terminate ()
 
virtual ~KviSensitiveThread ()
 
- Public Member Functions inherited from KviThread
void internalThreadRun_doNotTouchThis ()
 
bool isRunning ()
 
bool isStartingUp ()
 
 KviThread ()
 
bool start ()
 
void wait ()
 
virtual ~KviThread ()
 

Protected Member Functions

virtual void run ()
 
void updateStats ()
 
- Protected Member Functions inherited from DccThread
bool handleInvalidSocketRead (int readLen)
 
- Protected Member Functions inherited from KviSensitiveThread
KviThreadEventdequeueEvent ()
 
- Protected Member Functions inherited from KviThread
void exit ()
 
void postEvent (QObject *o, QEvent *e)
 

Private Attributes

KviDccSendThreadOptionsm_pOpt
 
KviMSecTimeIntervalm_pTimeInterval
 
quint64 m_uAckedBytes
 
uint m_uAverageSpeed
 
quint64 m_uFilePosition
 
quint64 m_uInstantSentBytes
 
uint m_uInstantSpeed
 
unsigned long m_uInstantSpeedInterval
 
unsigned long m_uStartTime
 
quint64 m_uTotalSentBytes
 

Additional Inherited Members

- Static Public Member Functions inherited from KviThread
static void msleep (unsigned long msec)
 
static void sleep (unsigned long sec)
 
static void usleep (unsigned long usec)
 
- Protected Attributes inherited from DccThread
kvi_socket_t m_fd
 
KviMutexm_pMutex
 
QObject * m_pParent
 
- Protected Attributes inherited from KviSensitiveThread
KviPointerList< KviThreadEvent > * m_pLocalEventQueue
 
KviMutexm_pLocalEventQueueMutex
 

Constructor & Destructor Documentation

DccSendThread::DccSendThread ( QObject *  par,
kvi_socket_t  fd,
KviDccSendThreadOptions opt 
)
DccSendThread::~DccSendThread ( )

References m_pOpt, and m_pTimeInterval.

Member Function Documentation

quint64 DccSendThread::ackedBytes ( )
inline

References m_uAckedBytes.

Referenced by DccFileTransfer::displayPaint().

uint DccSendThread::averageSpeed ( )
inline
unsigned int DccSendThread::bandwidthLimit ( )
inline
void DccSendThread::doneGetInfo ( )
quint64 DccSendThread::filePosition ( )
inline
void DccSendThread::initGetInfo ( )
uint DccSendThread::instantSpeed ( )
inline
void DccSendThread::run ( )
protectedvirtual

Reimplemented from KviThread.

References __tr2qs_ctx(), KviError::AcknowledgeError, KviMemory::allocate(), _KviDccSendThreadOptions::bFastSend, _KviDccSendThreadOptions::bIsTdcc, _KviDccSendThreadOptions::bNoAcks, _ack_buffer::cAckBuffer, KviError::CantOpenFileForReading, KviError::CantSendAZeroSizeFile, KviSensitiveThread::dequeueEvent(), e, KviError::FileIOError, KviMemory::free(), DccThread::handleInvalidSocketRead(), _ack_buffer::i32AckBuffer, _KviDccSendThreadOptions::iIdleStepLengthInMSec, INSTANT_BANDWIDTH_CHECK_INTERVAL_IN_MSECS, INSTANT_BANDWIDTH_CHECK_INTERVAL_IN_SECS, _KviDccSendThreadOptions::iPacketSize, KVI_DCC_THREAD_EVENT_MESSAGE, KVI_DCC_THREAD_EVENT_SUCCESS, KVI_INVALID_SOCKET, kvi_select(), kvi_socket_close, kvi_socket_error(), kvi_socket_recv(), kvi_socket_send(), KVI_THREAD_EVENT_TERMINATE, KviMutex::lock(), DccThread::m_fd, DccThread::m_pMutex, m_pOpt, m_pTimeInterval, m_uAckedBytes, m_uFilePosition, m_uInstantSentBytes, m_uInstantSpeedInterval, m_uStartTime, m_uTotalSentBytes, KviMSecTimeInterval::mark(), MAX_DCC_BANDWIDTH_LIMIT, KviThread::msleep(), DccThread::parent(), DccThread::postErrorEvent(), KviThread::postEvent(), KviCString::ptr(), KviError::RemoteEndClosedConnection, KviMSecTimeInterval::secondsCounter(), KviThreadDataEvent< TData >::setData(), KviError::SSLError, KviError::Success, _KviDccSendThreadOptions::szFileName, KviError::translateSystemError(), _KviDccSendThreadOptions::uMaxBandwidth, KviMutex::unlock(), updateStats(), and _KviDccSendThreadOptions::uStartPosition.

quint64 DccSendThread::sentBytes ( )
inline
void DccSendThread::setBandwidthLimit ( unsigned int  uMaxBandwidth)
inline
void DccSendThread::updateStats ( )
protected

Member Data Documentation

KviDccSendThreadOptions* DccSendThread::m_pOpt
private
KviMSecTimeInterval* DccSendThread::m_pTimeInterval
private
quint64 DccSendThread::m_uAckedBytes
private

Referenced by ackedBytes(), run(), and updateStats().

uint DccSendThread::m_uAverageSpeed
private
quint64 DccSendThread::m_uFilePosition
private

Referenced by DccSendThread(), filePosition(), and run().

quint64 DccSendThread::m_uInstantSentBytes
private

Referenced by run(), and updateStats().

uint DccSendThread::m_uInstantSpeed
private
unsigned long DccSendThread::m_uInstantSpeedInterval
private

Referenced by DccSendThread(), run(), and updateStats().

unsigned long DccSendThread::m_uStartTime
private

Referenced by DccSendThread(), run(), and updateStats().

quint64 DccSendThread::m_uTotalSentBytes
private

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