From a7161d92f965848049dbb2eaa80cce0aa178c0ed Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Fri, 6 Dec 2013 23:07:49 +0100 Subject: Improve MTU exchange --- gatoattclient.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gatoattclient.h') diff --git a/gatoattclient.h b/gatoattclient.h index e373a27..aaa214b 100644 --- a/gatoattclient.h +++ b/gatoattclient.h @@ -41,8 +41,10 @@ public: QByteArray value; }; + int mtu() const; + uint request(int opcode, const QByteArray &data, QObject *receiver, const char *member); - uint requestExchangeMTU(quint8 client_mtu, QObject *receiver, const char *member); + uint requestExchangeMTU(quint16 client_mtu, QObject *receiver, const char *member); uint requestFindInformation(GatoHandle start, GatoHandle end, QObject *receiver, const char *member); uint requestFindByTypeValue(GatoHandle start, GatoHandle end, const GatoUUID &uuid, const QByteArray& value, QObject *receiver, const char *member); uint requestReadByType(GatoHandle start, GatoHandle end, const GatoUUID &uuid, QObject *receiver, const char *member); @@ -86,11 +88,11 @@ private slots: void handleSocketDisconnected(); void handleSocketReadyRead(); - void handleServerMTU(uint req, quint8 server_mtu); + void handleServerMTU(uint req, quint16 server_mtu); private: GatoSocket *socket; - quint8 mtu; + quint16 cur_mtu; uint next_id; QQueue pending_requests; }; -- cgit v1.2.3