Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Jun : Re: What is a socket?
| Subject: | Re: What is a socket? |
| Posted by: | "Richard Bibby" (richard.bib..@profdoc.se) |
| Date: | Mon, 19 Jun 2006 16:51:33 |
Hej,
Here are the error messages I received. My error reporting is a little
primative so I am not sure of the order of the messages but theyare:
Cound not bind socket Address and port are already in use.
Socket error # 10038. Socket operation on non-socket.
Socket error # 10022. Invalid argument.
If I understand you correctly there is no problem having a tidHTTPServer
component running in a service application that also has a timer event that
can trigger a call to idHTTP to do a Post.
Any help/advice would be appreciated.
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> skrev i meddelandet
news:44961289$1@newsgroups.borland.com...
>
>
> "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