TcpClient <=> TcpServer Communication problems : data seems never to arrive !

Giganews Newsgroups
Subject: TcpClient <=> TcpServer Communication problems : data seems never to arrive !
Posted by:  Stephane Wierzbicki (swierzbic…
Date: Fri, 16 Apr 2004


I'm writting a simple client/server application. I'm using D7 and Indy
I will try to explain how it works, and what kind of problems I'm facing :

The client software is installed on 2 servers.... (not from the same

The launching the client software, it :
- Read an Ini file and check all the sections...
- For each Sections in the ini file it gather infos and create a new job
(TCPClient Connection)
- Each Connections are doing this :
    - Extract data from an sql table on the client side (works)
    - Zip the extracted data (works)
    - Connect to the remote server (works)
    - Send the file (works)
    - Server answer fille created or not (works)
    - Tell the server to unzip the file (works)
    - Server answer file unziped or not (works)
    - Tell server to insert the new table (works but insertion take a long
long time : from 30min up to 90min depending the size of the table)
    - Server ansnwer that datas has been inserted  or not ===> Here is my
problem. ( get sometimes an answer)
    - Client Close the connection and mark the job as finished  and tells if
everything was ok or not (given the server result) ====> Never close....

- A thread is running, when all job are finished, the application is
terminated and a log file is written

I only get answer on the 1srt launched Client. and on the 1st job.
Right now, On both client , there is 2 jobs.....

The Client never close !

In the Client side, I create for each job, a new Tcpclient...

In the server side, I one TCPServer component :
In the Execute event, I use this :

With AThread.connection Do

Do some action


If the server disconnect the thread, the client stay still connected !!!!

Can someone helps me ?