summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkaccessdebugpipebackend_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/access/qnetworkaccessdebugpipebackend_p.h')
-rw-r--r--src/network/access/qnetworkaccessdebugpipebackend_p.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/network/access/qnetworkaccessdebugpipebackend_p.h b/src/network/access/qnetworkaccessdebugpipebackend_p.h
index 73a35cf..a13edc4 100644
--- a/src/network/access/qnetworkaccessdebugpipebackend_p.h
+++ b/src/network/access/qnetworkaccessdebugpipebackend_p.h
@@ -66,35 +66,38 @@ class QNetworkAccessDebugPipeBackend: public QNetworkAccessBackend
{
Q_OBJECT
public:
- struct DataPacket;
QNetworkAccessDebugPipeBackend();
virtual ~QNetworkAccessDebugPipeBackend();
virtual void open();
virtual void closeDownstreamChannel();
- virtual void closeUpstreamChannel();
virtual bool waitForDownstreamReadyRead(int msecs);
- virtual bool waitForUpstreamBytesWritten(int msecs);
- virtual void upstreamReadyRead();
virtual void downstreamReadyWrite();
+protected:
+ void pushFromSocketToDownstream();
+ void pushFromUpstreamToSocket();
+ void possiblyFinish();
+ QNonContiguousByteDevice *uploadByteDevice;
+
private slots:
+ void uploadReadyReadSlot();
void socketReadyRead();
void socketBytesWritten(qint64 bytes);
void socketError();
void socketDisconnected();
+ void socketConnected();
private:
QTcpSocket socket;
- qint32 incomingPacketSize;
- bool readyReadEmitted;
- bool bytesWrittenEmitted;
bool bareProtocol;
+ bool hasUploadFinished;
+ bool hasDownloadFinished;
+ bool hasEverythingFinished;
- bool send(const DataPacket &packet);
- bool canReceive();
- bool receive(DataPacket &packet);
+ qint64 bytesDownloaded;
+ qint64 bytesUploaded;
};
class QNetworkAccessDebugPipeBackendFactory: public QNetworkAccessBackendFactory