23 m_objMutex(QMutex::NonRecursive)
59 if (intMemoryLimit <= 0) {
83 m_objFIFO.enqueue(QByteArray(chrData,intSize));
129 return QIODevice::open(mode);
136 QByteArray objCurrentArray;
137 int intEffectiveLen = 0;
138 int intExpectedLen = 0;
139 int intThreadLoop = 0;
141 intExpectedLen = (int) len;
143 if (intExpectedLen <= 0) {
186 if (intExpectedLen < intEffectiveLen)
190 memcpy((
void *)data,objCurrentArray.constData(),intExpectedLen);
191 m_objFIFO.head().remove(0,intExpectedLen);
192 intEffectiveLen = intExpectedLen;
199 memcpy((
void *)data,objCurrentArray.constData(),intEffectiveLen);
213 return (qint64)intEffectiveLen;
QEventLoop m_objeventLoop
virtual bool isSequential() const
bool setMemoryLimit(int intMemoryLimit)
virtual qint64 readData(char *data, qint64 len)
QQueue< QByteArray > m_objFIFO
qint64 m_intTotalReceived
int pushData(const char *chrData, int intSize)
virtual qint64 writeData(const char *data, qint64 len)
virtual qint64 bytesAvailable() const
qint64 m_intPacketReceived
virtual qint64 readLineData(char *data, qint64 maxSize)
virtual bool open(OpenMode mode)
#define DefaultMemoryLimit
void onDataPackets(int *intDataPackets, int *intDataBytes, int *intPercentBuffer, qint64 *intTotalReceived)