PDA

View Full Version : data rate transfer is decreasing in TCP connection



navi1084
19th June 2009, 06:10
DearAll,

My project is based on QTcpSocket. My pc is connected with a external device which sends lots of data to my pc and my application has to extract all the packets and process it in proper way. Device continuously sends the huge amount of data (for example: image and some data related to the image) and my application has to process this image and related data. If device is not connected to any pc, device will do its normal activity i.e in this case capture new image and collect data related to that. In connected mode, I observed initially for few seconds data transfer rate is very high and even my program process all the data. But after few seconds transfer of data rate from the device will decrease. At some point the device stop sending data to my pc. I found there is no problem in the device. if i close my application, then device works properly as it was in the initial state.
Can anyone tell me what is there any problem in my appliaction which cause decrease in rate of transfer of data. If yes please tell me how can i resolve it.
Is this because of TCP satck of my pc is full and not sending acknowledgment to the device.???

Is there any tool from which i can see Data in socket and TCP stack???

wysota
19th June 2009, 13:38
Do you read the data from the socket fast enough? There is a buffer in the socket that gets filled and stops the flow to avoid data loss.

navi1084
19th June 2009, 13:55
yes i do. whenever appliaction recieve the data i process it and checks for socket whether it contains data. if it has i process once again. This will continue until socket is empty.

wysota
19th June 2009, 17:15
Can we see the code?