summaryrefslogtreecommitdiffstats
path: root/examples/corelib/ipc/localfortuneclient/client.h
diff options
context:
space:
mode:
authorSérgio Martins <sergio.martins@kdab.com>2016-08-28 21:34:32 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2016-10-06 21:20:33 +0000
commitdd00f6dd91a28f3e76bc4c3e894174efffc7f201 (patch)
tree7c92b7fea6b8a9d1cf12b00f2a22f546012e3bcc /examples/corelib/ipc/localfortuneclient/client.h
parentf9acbaccde278eaf44a5324c2a63a99a4cccfb1c (diff)
Handle short reads in the local sockets example
Protection against short reads was already half implemented, blockSize was being sent by the server but never used by the client. Also, blockSize was bumped to quint32: If you're in a position where short reads can happen then quint16 is probably not enough to hold the size of your data. On Linux I could only reproduce short reads for messages > 500K. Change-Id: I191a3d781da1d8a119debbdafae641c8340a1da2 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'examples/corelib/ipc/localfortuneclient/client.h')
-rw-r--r--examples/corelib/ipc/localfortuneclient/client.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/corelib/ipc/localfortuneclient/client.h b/examples/corelib/ipc/localfortuneclient/client.h
index f12957fe33..8ba767b4fa 100644
--- a/examples/corelib/ipc/localfortuneclient/client.h
+++ b/examples/corelib/ipc/localfortuneclient/client.h
@@ -76,7 +76,7 @@ private:
QLocalSocket *socket;
QString currentFortune;
- quint16 blockSize;
+ quint32 blockSize;
};
#endif