Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Jan : Force client disconnect with TIDCmdTCPServer

www.cryer.info
Managed Newsgroup Archive

Force client disconnect with TIDCmdTCPServer

Subject:Force client disconnect with TIDCmdTCPServer
Posted by:"Gaspar" (norep..@noreply.com)
Date:Fri, 5 Jan 2007 23:02:01

I have a server thread that checks certains conditions in the connected
client list. If this connection is met then the client should inmmediately
be disconnect. The problem is that the following statement raises a
"Disconnected" exception:

TIDContext(ClientData).Connection.Disconnect
(or  TIDContext(ClientData).Connection.Disconnect(false))

I thinks some read operation is in other thread, causing the exception. If
this is the case: how to stop all read activity to disconnect gracefully?

In any case, help is appreciated.

Thanks!

Replies:

www.cryer.info
Managed Newsgroup Archive