Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Sep : Re: TIdTCPClient socket error

www.cryer.info
Managed Newsgroup Archive

Re: TIdTCPClient socket error

Subject:Re: TIdTCPClient socket error
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Fri, 21 Sep 2007 12:21:45

"Toby Piper" <news@CompCraft.com> wrote in message
news:46f406de$1@newsgroups.borland.com...

> With the server hanging and not responding I eventually get
> a continuous socket error on the client.

What is the actual error you are getting?

> How do I close the connection when I get socket errors (or any others)?

Just call Disconnect() like any other time.

> I have tried clearing the buffers and disconnecting, but that
> doesn't seem to do it.

Yes, it does.

>           LMSClient.IOHandler.WriteBufferClear;

Use WriteBufferCancel() instead.  That way, the buffer is freed from memory.
If you don't do that, then the buffer will still be active (the
WriteBufferingActive property will be True) the next time you connect, and
will be subject to your original flush threshold (which is -1 by default).


Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive