Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 May : Indy and/or ICS - connection object lifetime

www.cryer.info
Managed Newsgroup Archive

Indy and/or ICS - connection object lifetime

Subject:Indy and/or ICS - connection object lifetime
Posted by:"Martin James" (nospam@tuthill.com)
Date:Wed, 16 May 2007 15:22:38

It seems that both of these component sets have servers that auto-free their
connection socket-objects, (whatever they are called in each set), upon
client disconnect.  I don't want this to happen.  I want to keep the
connection-objects after the client connection drops.  I want to free them
myself after a couple minutes, (I will put them in a timeout list).

Why?  So that other threads/whatever that intend to write through these
connection-objects, or queue objects to them, can detect that the connection
has gone and not try to do things they were going to do that will now fail.
I would rather not use an AV or Windows socket error as a method of
detection for this - I would like to have a little CS-protected state inside
the connection-object that can be referred to.

How can I do this with Indy, (9), or ICS?

Rgds,
Martin

Replies:

www.cryer.info
Managed Newsgroup Archive