Indy TCP server and Java client
Hi,
I have a Java client that sends blocks of data to a IdTCPServer.
The client does this by openening a connection, send the data and then close
the connection again.
I know it is not the most efficient way, but I can not change the protocol
used because
I do not have the code of the server application (I do know its Indy!)
At the server side: for each connection a thread is started, the received
data is
processed....but...
As the connection is closed by the Java client the thread that was handling
it keeps on running?!?
Funny thing is that when I create a similar client in Delphi using the exact
same method
of connection and data handling the threads 'die' as they should.
I created a dummy server for test purposes and tried to resolve the problem
I experienced with the Java client.
When the data is "handled" by the dummy server and I explicitly disconnect
the Java client from the server-side the connection-thread 'dies' as it
should ?!?
As I said earlier I do not own the code to the real server application so I
cannot implement
the server side disconnect (if I had the code I probably would change the
whole protocol....).
So, is there anyone who could tell me if (and how) I could force a
serverside disconnect from within Java?
Thanks,
Pim