From 14d20babe395e52d220bbc27e91cec2fddd1ed0f Mon Sep 17 00:00:00 2001 From: Javier Date: Thu, 24 Dec 2015 19:04:04 +0100 Subject: still testing sap control flow --- sapsocket.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'sapsocket.h') diff --git a/sapsocket.h b/sapsocket.h index 0452e9d..ce3c98b 100644 --- a/sapsocket.h +++ b/sapsocket.h @@ -36,6 +36,7 @@ signals: protected: void setOpen(bool open); void acceptIncomingData(const QByteArray &data); + void acceptIncomingControl(const QByteArray &data); int sessionId() const; @@ -45,18 +46,24 @@ private: bool isReliable() const; bool isWithSeqNum() const; + void sendBlockAck(int seqNum); + void sendPacket(int seqNum, const QByteArray &data); + + void handleBlockAck(int seqNum); + void sendPacketsFromQueue(); + private: const int _sessionId; const SAPChannelInfo _info; bool _open; QQueue _in; QQueue _out; - QBasicTimer _timer; + QBasicTimer _ackTimer; + QBasicTimer _resendTimer; - /** Outgoing sequence number */ - quint16 _outLastSeqNum; /** Last acknowledged sent message. */ quint16 _outLastAck; + quint16 _outFlyingPkts; /** Next expected incoming sequence number */ quint16 _inLastSeqNum; -- cgit v1.2.3