From 5abd8e0359cfa1dc2437427f2f0446d8801441cb Mon Sep 17 00:00:00 2001 From: Javier Date: Mon, 14 Dec 2015 22:07:50 +0100 Subject: initial ack controlflow implementation --- sapsocket.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'sapsocket.h') diff --git a/sapsocket.h b/sapsocket.h index 38d83ea..a2a360a 100644 --- a/sapsocket.h +++ b/sapsocket.h @@ -3,6 +3,7 @@ #include #include +#include #include "sapchannelinfo.h" @@ -38,6 +39,8 @@ protected: int sessionId() const; + virtual void timerEvent(QTimerEvent *event) override; + private: bool isReliable() const; bool isWithSeqNum() const; @@ -47,8 +50,15 @@ private: const SAPChannelInfo _info; bool _open; QQueue _in; - quint16 _seqNum; - quint16 _expectedSeqNum; + QBasicTimer _timer; + + /** Outgoing sequence number */ + quint16 _outLastSeqNum; + + /** Next expected incoming sequence number */ + quint16 _inLastSeqNum; + /** Last acknowledged sequence number */ + quint16 _inLastAck; friend class SAPPeer; }; -- cgit v1.2.3