Re: HTTP Server and gSOAP: no results

Giganews Newsgroups
Subject: Re: HTTP Server and gSOAP: no results
Posted by:  Remy Lebeau (Indy Team) (
Date: Thu, 17 Aug 2006

"Jens" <j…> wrote in message

> When debugging Indy9 and Indy10 I found the difference between these 2
> versions. The implementation of TIdTCPConnection.Connected is different.
> Indy9 only asks if the socket is still valid. Indy10 asks if the socket is
> and trys to read some new data.

And the problem with that is....?  Because Indy uses blocking sockets,
accessing the socket is the only way to validate whether it is actually
connected or not.

> If the result of the amount of read data is 0 it sets the flag
fCloseGracefully to TRUE.

As it should be.  When a blocking socket reports that it has data available
for reading, but then returns 0 bytes, that is how it reports that the other
party has gracefully disconnected.  If the socket was not disconnected, but
no data has arrived yet, then the socket will not report that is has data
available for reading.  Indy always checks the socket's readability before
checking for 0 bytes read.

> I think that this behaviour is a bug

I disagree.



In response to

HTTP Server and gSOAP: no results posted by Jens on Thu, 17 Aug 2006