KVIrc
4.9.2
DeveloperAPIs
|
#include <DccFileTransfer.h>
Public Member Functions | |
uint | averageSpeed () |
unsigned int | bandwidthLimit () |
DccRecvThread (QObject *par, kvi_socket_t fd, KviDccRecvThreadOptions *opt) | |
void | doneGetInfo () |
quint64 | filePosition () |
void | initGetInfo () |
uint | instantSpeed () |
quint64 | receivedBytes () |
void | setBandwidthLimit (unsigned int uMaxBandwidth) |
~DccRecvThread () | |
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 | |
void | postMessageEvent (const char *msg) |
virtual void | run () |
bool | sendAck (qint64 filePos, bool bUse64BitAck=false) |
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) |
Protected Attributes | |
QFile * | m_pFile |
KviDccRecvThreadOptions * | m_pOpt |
KviMSecTimeInterval * | m_pTimeInterval |
uint | m_uAverageSpeed |
quint64 | m_uFilePosition |
quint64 | m_uInstantReceivedBytes |
uint | m_uInstantSpeed |
quint64 | m_uInstantSpeedInterval |
unsigned long | m_uStartTime |
quint64 | m_uTotalReceivedBytes |
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 |
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) |
DccRecvThread::DccRecvThread | ( | QObject * | par, |
kvi_socket_t | fd, | ||
KviDccRecvThreadOptions * | opt | ||
) |
DccRecvThread::~DccRecvThread | ( | ) |
References m_pFile, m_pOpt, and m_pTimeInterval.
|
inline |
References m_uAverageSpeed.
Referenced by DccFileTransfer::averageSpeed(), and DccFileTransfer::displayPaint().
|
inline |
References m_pOpt, and _KviDccRecvThreadOptions::uMaxBandwidth.
Referenced by DccFileTransfer::bandwidthLimit().
void DccRecvThread::doneGetInfo | ( | ) |
|
inline |
References m_uFilePosition.
Referenced by DccFileTransfer::displayPaint(), and DccFileTransfer::transferredBytes().
void DccRecvThread::initGetInfo | ( | ) |
|
inline |
References m_uInstantSpeed.
Referenced by DccFileTransfer::displayPaint(), and DccFileTransfer::instantSpeed().
|
protected |
References e, KVI_DCC_THREAD_EVENT_MESSAGE, DccThread::parent(), KviThread::postEvent(), and KviThreadDataEvent< TData >::setData().
Referenced by run().
|
inline |
References m_uTotalReceivedBytes.
Referenced by DccFileTransfer::abort(), and DccFileTransfer::event().
|
protectedvirtual |
Reimplemented from KviThread.
References __tr_no_lookup_ctx, _KviDccRecvThreadOptions::bNoAcks, _KviDccRecvThreadOptions::bResume, _KviDccRecvThreadOptions::bSend64BitAck, _KviDccRecvThreadOptions::bSendZeroAck, KviError::CantOpenFileForAppending, KviError::CantOpenFileForWriting, KviSensitiveThread::dequeueEvent(), e, KviError::FileIOError, DccThread::handleInvalidSocketRead(), _KviDccRecvThreadOptions::iIdleStepLengthInMSec, INSTANT_BANDWIDTH_CHECK_INTERVAL_IN_MSECS, INSTANT_BANDWIDTH_CHECK_INTERVAL_IN_SECS, KVI_DCC_RECV_75PERCENTOF_BLOCK_SIZE, KVI_DCC_RECV_BLOCK_SIZE, KVI_DCC_THREAD_EVENT_SUCCESS, KVI_INVALID_SOCKET, kvi_select(), kvi_socket_close, kvi_socket_recv(), KVI_THREAD_EVENT_TERMINATE, kvi_unixTime, KviMutex::lock(), DccThread::m_fd, m_pFile, DccThread::m_pMutex, m_pOpt, m_pTimeInterval, m_uInstantReceivedBytes, m_uInstantSpeedInterval, m_uStartTime, m_uTotalReceivedBytes, KviMSecTimeInterval::mark(), MAX_DCC_BANDWIDTH_LIMIT, KviThread::msleep(), DccThread::parent(), DccThread::postErrorEvent(), KviThread::postEvent(), postMessageEvent(), KviCString::ptr(), KviMSecTimeInterval::secondsCounter(), sendAck(), KviError::SSLError, KviError::Success, _KviDccRecvThreadOptions::szFileName, _KviDccRecvThreadOptions::uMaxBandwidth, KviMutex::unlock(), updateStats(), and _KviDccRecvThreadOptions::uTotalFileSize.
|
protected |
(defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW))
(defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW))
References KviError::AcknowledgeError, kvi_socket_error(), kvi_socket_send(), DccThread::m_fd, DccThread::postErrorEvent(), KviError::SSLError, and KviError::Success.
Referenced by run().
|
inline |
References m_pOpt, and _KviDccRecvThreadOptions::uMaxBandwidth.
Referenced by DccFileTransfer::setBandwidthLimit().
|
protected |
References INSTANT_BANDWIDTH_CHECK_INTERVAL_IN_MSECS, INSTANT_BANDWIDTH_CHECK_INTERVAL_IN_SECS, KviMutex::lock(), m_pFile, DccThread::m_pMutex, m_pTimeInterval, m_uAverageSpeed, m_uFilePosition, m_uInstantReceivedBytes, m_uInstantSpeed, m_uInstantSpeedInterval, m_uStartTime, m_uTotalReceivedBytes, KviMSecTimeInterval::mark(), KviMSecTimeInterval::secondsCounter(), and KviMutex::unlock().
Referenced by run().
|
protected |
Referenced by DccRecvThread(), run(), updateStats(), and ~DccRecvThread().
|
protected |
Referenced by bandwidthLimit(), DccRecvThread(), run(), setBandwidthLimit(), and ~DccRecvThread().
|
protected |
Referenced by DccRecvThread(), run(), updateStats(), and ~DccRecvThread().
|
protected |
Referenced by averageSpeed(), DccRecvThread(), and updateStats().
|
protected |
Referenced by DccRecvThread(), filePosition(), and updateStats().
|
protected |
Referenced by DccRecvThread(), run(), and updateStats().
|
protected |
Referenced by DccRecvThread(), instantSpeed(), and updateStats().
|
protected |
Referenced by DccRecvThread(), run(), and updateStats().
|
protected |
Referenced by DccRecvThread(), run(), and updateStats().
|
protected |
Referenced by DccRecvThread(), receivedBytes(), run(), and updateStats().