Newsgroups : Borland : borland.public.delphi.internet.winsock : 2005 Nov : TClientSocket error 10061

www.cryer.info
Managed Newsgroup Archive

TClientSocket error 10061

Subject:TClientSocket error 10061
Posted by:"Graham Powell" (grah..@deephaven.co.uk)
Date:Mon, 28 Nov 2005 18:04:17

If I have a TClientSocket and try to Open a connection to an IP address
where there is no listening Server socket, I get a 10061 error as expected.
But in the ClientSocket Error event I set Error := 0 before exiting and I
still get an application error.
The documentation states that if you set Error to 0, the error is considered
dealt with. Looking at the source code of ScktComp.pas this would appear to
be the case, but not in practice.

So, is the ScktComp.dcu actually compiled from the ScktComp.pas in the
source directory?

I have found that if I copy ScktComp.pas to my working directory, change the
name to ScktCompX.pas, change the unit name to ScktCompX. Then set my uses
clause to ScktCompX. Now if I recompile, I get ScktComp re-appear in my uses
clause, but it now works. Connecting to a non existing server does not
generate an application error.

This happens with Delphi 7 and Delphi 2005.

Any clues as to what is going on?

Graham

Replies:

www.cryer.info
Managed Newsgroup Archive