Indy Client Server freezing
Posted on 2009-04-17
I am having a really hard time to solve an Indy10 communication problem. I have a client-server project which uses TIdTCPClient and TIdTCPServer to send files across the network (LAN). The application must be able to send files in both directions: client to server and server to client. At the moment I am testing server to client part. I send files using fixed length chunks.
Sometimes the communication loop will freeze at a random iteration in the line where the client confirms reception of the chunk (it writes 1 byte response to the handler) . For testing I am using Windows XP SP3 file (313 MB) because with large files the problem is more likely to happen.
Some important facts you must know before answering:
- I have downloaded latest version of indy 10 available from SVN, few weeks ago.
- Server and Client sending loops are out from main VCL thread.
- I have IdAntifreeze components on both sides
- I have tried differents types of reading/writing to the IOHandler: ReadByte, ReadStream, ReadLn...
- I use MadExcept and exhaustive logging to find out things, so I am quite sure that the read instruction in the server does not exit, but the client does write the response byte.
Does anyone know a reason why the TIdTCPServer does not receive the client response while the TidTCPClient skips to the instruction after the write? They are suposed to use blocking sockets... It does not make any sense to me.
Any help will be greatly appreciated.
PS: I may not be able to read this post until monday, but i just could not wait.