summaryrefslogtreecommitdiff
path: root/sapsocket.h
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2015-12-14 22:07:50 +0100
committerJavier <dev.git@javispedro.com>2015-12-14 22:07:50 +0100
commit5abd8e0359cfa1dc2437427f2f0446d8801441cb (patch)
treec02602e849cf47928411b8f0b3e9e6eb34facdc9 /sapsocket.h
parent702e018ca9e780bb076033ce5d1d370d4eb7319e (diff)
downloadsapd-5abd8e0359cfa1dc2437427f2f0446d8801441cb.tar.gz
sapd-5abd8e0359cfa1dc2437427f2f0446d8801441cb.zip
initial ack controlflow implementation
Diffstat (limited to 'sapsocket.h')
-rw-r--r--sapsocket.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/sapsocket.h b/sapsocket.h
index 38d83ea..a2a360a 100644
--- a/sapsocket.h
+++ b/sapsocket.h
@@ -3,6 +3,7 @@
#include <QtCore/QObject>
#include <QtCore/QQueue>
+#include <QtCore/QBasicTimer>
#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<QByteArray> _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;
};