Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Jul : How to quit TIdTCPServer while Client is still connected? EIdClosedSocket Except

www.cryer.info
Managed Newsgroup Archive

How to quit TIdTCPServer while Client is still connected? EIdClosedSocket Except

Subject:How to quit TIdTCPServer while Client is still connected? EIdClosedSocket Except
Posted by:"Marc" (marc.breu..@giant-online.de)
Date:Tue, 25 Jul 2006 15:47:05

Hi,
I need to be able to close a TIdTCPServer (Indy 10) Connection while a
client is still connected.
When doing a IdTCPServer.Active := False while a client is connected, a
EIdClosedSocket with "Disconnected." Exception is fired. When there is no
client connected, everything closes fine.
I didn't find any way to close the client connection from the server from
the main thread.
When running the app outside the debugger, the application hangs after
setting the server.active to false.
Also when killing the server, the client isn't notified about this, no event
is called.
Can anyone help me with this problem? I already did a search in google and
found a lot of questions for this, but no answers.

Thanks
Marc

Replies:

www.cryer.info
Managed Newsgroup Archive