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:Tue, 10 Oct 2006 11:31:43

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

> I wanted to know whether Indy was listening at all on my wired
> connection when two IPs where present. It happens that the init
> loop finds the WiFi connection first in GStack.Addresses, and
> the wired one second.

The order of the IPs is controlled by the OS, but the order does not
actually matter in this situation since you are actively listening on all of
the available addresses.  If you were listening on the first IP only, then
the ordering would have more impact.

> At startup, TFTPServer only listen to the first of its bindings.

Not true.  It actively listens on all entries in the Bindings collection
equally.

> The TFTPServer has automatically switched to the second binding
> and is now listening on the second binding only.

Not true, either.  Each binding is run in its own thread.  Each binding has
no effect on the other bindings.

> Is TIdTrivialFTPServer designed to support multiple binding
> when ThreadedEvent is set to false?

Yes.  The ThreadedEvent property has no effect on that at all.
ThreadedEvent only controls whether the server's virtual DoUDPRead() (and
thus any event handlers it triggers, such as OnReadFile) are triggered in
the context of the main VCL thread, or in the context of the worker thread
for the binding that accepted the inbound data.


Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive