Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Jun : Re: What is a socket?

www.cryer.info
Managed Newsgroup Archive

Re: What is a socket?

Subject:Re: What is a socket?
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Sun, 18 Jun 2006 19:54:32

"Richard Bibby" <richard.bibby@profdoc.se> wrote in message
news:4495a5c6@newsgroups.borland.com...

> However occasionally I get a socket error when posting
> the SMS message.

What does the code look like?  What is the exact error?

> I assume that this is because the idHTTPServer component
> has the socket open.

That is not true.  TIdHTTP will create its own socket instance on a
different port than the one the TIdHTTPServer is using.

> Could I have two sockets open if I used a different port?

Yes.  Sockets always use random ports by default for the exact purpose of
being unique from other sockets.  It is only when applications try to lock
down the port values explicitally that conflicts can occur.

> If not I guess its ok to gracefully handle the socket error, back
> off a bit, and then retry?

There is no way to answer that without knowing more about what is actually
happening to begin with.


Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive