diff options
author | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-02-16 10:20:07 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-02-20 10:22:31 +0000 |
commit | df667f7560f2625d7278935a18bf12b47f76d4d3 (patch) | |
tree | 968b3216de517fa363f5d22166a0de462d90e374 /dist | |
parent | d6bca86cad962a0078c2a8111133cff123f1ba0a (diff) |
Fix handling of incomplete messages in client/server communication
Do not assume that the socket always contains enough data. Instead,
prefix every 'packet' with its size, and back off until the full
packet is available.
The actual encoding/decoding is done in Protocol::sendPacket,
Protocol::receivePacket. To be able to use the methods everywhere,
replies are now prefixed by a Protocol::Reply command.
Change-Id: I75a89605b2cc3fe2f2f841d8e3159fc8aea65d77
Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Diffstat (limited to 'dist')
0 files changed, 0 insertions, 0 deletions