Hi,
First, use a buffer to store the data from the socket.
Into "readyRead()" method, first check if you have almost 16 bytes into the socket.
If you have 16 bytes into the socket you can read all available bytes and store it into your buffer.
After this you can check if the buffer size have the bytes that your header points to plus 16 bytes(header). If not, you will receive another "readyRead" signal (it's like a loop).
When the buffer contains all the bytes you can create the image and don't forget to clear the buffer for the next receiving image.
Bookmarks