Hi all!!

I'm writing a simple p2p file sending application and I'm of course using QTcpSocket to transfer data between host. I'm using Win XP + QT4.0.1.

When I want to send a file in a non-GUI thread in a blocking way suddenly after sending an amount of data (about 50KB) connection is lost on the sending side. I send data in a small packs, 1KB large, one after another. When I read socket errors after the disconnection it says that on sending side the waitForBytesWritten() have timed out( timeout is set to 10 seconds) and the socket is in a disconnected state. On the side of reciever the written data (as I wrote about 50KB) is there, but there is an error saying that remote host has closed the connection and the socket is in a disconnected state. I also watched debuggigng messeges on the console, but there is nothing about QTcpSocket.

Can anyone help?? What am I doing wrong??