Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Oct : Re: TIdTrivialFTPServer and multi-homed server?

www.cryer.info
Managed Newsgroup Archive

Re: TIdTrivialFTPServer and multi-homed server?

Subject:Re: TIdTrivialFTPServer and multi-homed server?
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Thu, 12 Oct 2006 19:45:34

"Philippe Auphelle" <pauphelle.No.Spam.Please@wanadoo.fr> wrote in message
news:452e1a2b@newsgroups.borland.com...

> After fixing in yesterday's snapshot the couple of lines that don't
compile,
> I used the snapshot Indy, recompiled my app, and surprise! It *does*
> work with two IPs, *without* changing anything else in my own code.

As it should be.

> Once again, I have no doubt that TidUDPServer has been *designed*
> to support multi-homing for years, but the hard fact is that the version I
> used of a stable 10.1.5 as of today does *not* seem to work properly
> on a multi-homed config.

Yes, it does.  TIdUDPServer has been using the same multi-homed architecture
for years that has worked fine.  The re-write done 11 months ago was merely
to optimize that better so that the OnUDPRead events triggered on multiple
items in the Bindings collection are not serialized anymore, which they
always were due to the single listener thread looping through the Bindings
one at a time.  But the Bindings themselves still work the same as they
always have.

>      // For each of our IP addresses, create and init a binding.
>      for i := 0 to GStack.LocalAddresses.Count - 1 do
>        with Bindings.Add do
>          begin
>          IP := GStack.LocalAddresses[i];

I explained to you earlier about the danger of accessing the LocalAddresses
property over and over like that.


Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive