From 702e018ca9e780bb076033ce5d1d370d4eb7319e Mon Sep 17 00:00:00 2001 From: Javier Date: Mon, 14 Dec 2015 01:52:17 +0100 Subject: properly handle data frames with sequence numbers --- sapsocket.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'sapsocket.h') diff --git a/sapsocket.h b/sapsocket.h index e1a9214..38d83ea 100644 --- a/sapsocket.h +++ b/sapsocket.h @@ -4,6 +4,8 @@ #include #include +#include "sapchannelinfo.h" + class SAPConnection; class SAPPeer; @@ -11,12 +13,14 @@ class SAPSocket : public QObject { Q_OBJECT - SAPSocket(SAPConnection *conn, int sessionId); + SAPSocket(SAPConnection *conn, int sessionId, const SAPChannelInfo &chanInfo); public: SAPPeer *peer(); SAPConnection *connection(); + SAPChannelInfo channelInfo() const; + bool isOpen() const; bool messageAvailable() const; @@ -35,9 +39,16 @@ protected: int sessionId() const; private: - int _sessionId; + bool isReliable() const; + bool isWithSeqNum() const; + +private: + const int _sessionId; + const SAPChannelInfo _info; bool _open; QQueue _in; + quint16 _seqNum; + quint16 _expectedSeqNum; friend class SAPPeer; }; -- cgit v1.2.3