Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Sep : Block TCP client call in a thread?

www.cryer.info
Managed Newsgroup Archive

Block TCP client call in a thread?

Subject:Block TCP client call in a thread?
Posted by:"Richard Bibby" (richard.bib..@profdoc.com)
Date:Tue, 18 Sep 2007 15:33:22

Hej,

We have an application that sends messages to a server using UDP on port 60.
We use the indy UDP client component to send the message.

Since many customers object to opening a new port in the firewall we decided
to use TCP on port 80.

So I removed the UDP client component and replaced it with a TCP client
compenent.

I should point out that this code is all in a component we have written.
The actual call to send the message is executed in its own thread so as not
to interrupt the calling application if the the firewall is closed and
connection can not be made.

This worked well with UDP but not with TCP.  The application hangs even
though the cleint TCP compoent is running in its own thread.

I guess this is what is called a blocking call.  Is there anyway to use the
Antifreeze component here?  Any suggestions how we can make this happen
without blocking the application?

/Richard

Replies:

www.cryer.info
Managed Newsgroup Archive