Hi
I'm currently developing a network application, and I've run into a few problems with my readyRead() handler. It works fine at low speeds, but it seems that once it receives a couple of packets at once it can start to corrupt the packet data?
I prepend a header portion (3 bytes) to each packet that includes a char at the front to identify the packet type and two bytes reserved for its size (quint16).
How can I optimize the code to work with large amounts of packets (and incomplete packets) per read?
Here's my readyRead() handler code: (It reads the packet and sends it to a specific UDP port on the localhost)
Thanks!
EDIT: It seems this isn't the problem as I compared precalculated checksums with checksum calculated after the block is received and they are identical. So if anything it might be the speed/order in which they are received/sent.
Bookmarks