PDA

View Full Version : Sending a image using QSocket & QServerSocket



machathu
28th March 2006, 04:09
Hi everyone,

I have created a Client-Server program using QT3. Client can connect with the server and server shoud be able to send screen shots to the client and client displays them in a lable.
Problem is that the server sends the image, client captures it but it doesn't identify as a image. Number of bytes send from the server and bytes captured from the client is same...
I tryed every thing but couldn't fix the problem. i've attach the to programs Client and Sever.
Can anybody help me on this........

jacek
28th March 2006, 12:23
QDataStream uses its own format for data, so if you send an integer QSocket::bytesAvailable() should be greater than sizeof(int).