Re: Socket operation on non-socket

Giganews Newsgroups
Subject: Re: Socket operation on non-socket
Posted by:  Remy Lebeau \(Indy Team\) (no.spam@no.spam.com)
Date: Thu, 14 Feb 2008

"sunrizer" <sunriz…@ukr.net> wrote in message
news:BF4922DD9648E340sunriz…@ukr.net...

> When I try to connect to the SMTP-server, which currently unavailible
> - TIdSMTP raises EIdNotASocket and EIdConnectTimeOut in one
> moment. Is it a bug ?

No, that is perfectly normal.  At the API layer, a blocking socket does not
have any timeout capability when connecting to a server.  So Indy uses a
separate thread to handle it.  If the thread takes too long to establish the
connection (as specified in the ConnectTimeout property), then Indy closes
the socket, raising the EIdNotASocket exception in the context of the
connecting thread (and thus your code will never see it but the debugger
will), and then raises the EIdConnectTimeOut exception (which your code will
see).

Gambit

Replies

None

In response to

Socket operation on non-socket posted by sunrizer on Thu, 14 Feb 2008