KVIrc
4.9.2
DeveloperAPIs
|
#include <DccFileTransfer.h>
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 | |
KviThreadEvent * | dequeueEvent () |
Protected Member Functions inherited from KviThread | |
void | exit () |
void | postEvent (QObject *o, QEvent *e) |
Private Attributes | |
KviDccSendThreadOptions * | m_pOpt |
KviMSecTimeInterval * | m_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 |
KviMutex * | m_pMutex |
QObject * | m_pParent |
Protected Attributes inherited from KviSensitiveThread | |
KviPointerList< KviThreadEvent > * | m_pLocalEventQueue |
KviMutex * | m_pLocalEventQueueMutex |
DccSendThread::DccSendThread | ( | QObject * | par, |
kvi_socket_t | fd, | ||
KviDccSendThreadOptions * | opt | ||
) |
References m_pOpt, m_pTimeInterval, m_uAverageSpeed, m_uFilePosition, m_uInstantSpeed, m_uInstantSpeedInterval, m_uStartTime, and m_uTotalSentBytes.
DccSendThread::~DccSendThread | ( | ) |
References m_pOpt, and m_pTimeInterval.
|
inline |
References m_uAckedBytes.
Referenced by DccFileTransfer::displayPaint().
|
inline |
References m_uAverageSpeed.
Referenced by DccFileTransfer::averageSpeed(), and DccFileTransfer::displayPaint().
|
inline |
References m_pOpt, and _KviDccSendThreadOptions::uMaxBandwidth.
Referenced by DccFileTransfer::bandwidthLimit().
void DccSendThread::doneGetInfo | ( | ) |
|
inline |
References m_uFilePosition.
Referenced by DccFileTransfer::displayPaint(), and DccFileTransfer::transferredBytes().
void DccSendThread::initGetInfo | ( | ) |
|
inline |
References m_uInstantSpeed.
Referenced by DccFileTransfer::displayPaint(), and DccFileTransfer::instantSpeed().
|
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.
|
inline |
References m_uTotalSentBytes.
Referenced by DccFileTransfer::abort(), and DccFileTransfer::event().
|
inline |
References m_pOpt, and _KviDccSendThreadOptions::uMaxBandwidth.
Referenced by DccFileTransfer::setBandwidthLimit().
|
protected |
References _KviDccSendThreadOptions::bNoAcks, INSTANT_BANDWIDTH_CHECK_INTERVAL_IN_MSECS, INSTANT_BANDWIDTH_CHECK_INTERVAL_IN_SECS, KviMutex::lock(), DccThread::m_pMutex, m_pOpt, m_pTimeInterval, m_uAckedBytes, m_uAverageSpeed, m_uInstantSentBytes, m_uInstantSpeed, m_uInstantSpeedInterval, m_uStartTime, m_uTotalSentBytes, KviMSecTimeInterval::mark(), KviMSecTimeInterval::secondsCounter(), KviMutex::unlock(), and _KviDccSendThreadOptions::uStartPosition.
Referenced by run().
|
private |
Referenced by bandwidthLimit(), DccSendThread(), run(), setBandwidthLimit(), updateStats(), and ~DccSendThread().
|
private |
Referenced by DccSendThread(), run(), updateStats(), and ~DccSendThread().
|
private |
Referenced by ackedBytes(), run(), and updateStats().
|
private |
Referenced by averageSpeed(), DccSendThread(), and updateStats().
|
private |
Referenced by DccSendThread(), filePosition(), and run().
|
private |
Referenced by run(), and updateStats().
|
private |
Referenced by DccSendThread(), instantSpeed(), and updateStats().
|
private |
Referenced by DccSendThread(), run(), and updateStats().
|
private |
Referenced by DccSendThread(), run(), and updateStats().
|
private |
Referenced by DccSendThread(), run(), sentBytes(), and updateStats().