Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Oct : Re: TIdTrivialFTPServer and multi-homed server?
| Subject: | Re: TIdTrivialFTPServer and multi-homed server? |
| Posted by: | "Philippe Auphelle" (pauphelle.no.spam.please@wanadoo.fr) |
| Date: | Tue, 10 Oct 2006 11:36:01 |
Gambit,
Thanks for the clarification (and simplification).
My init sequence thus became something along:
with MyTFTPServer do
begin
// Insure the place is clean:
Active := False;
Bindings.Clear;
// For each of our IP addresses, create and init a binding.
for i := 0 to GStack.LocalAddresses.Count - 1 do
begin
Bindings.Add;
Bindings[i].IP := GStack.LocalAddresses[i];
Log.Write(LLNormal, 'Created binding '
+ Bindings[i].IP
+ ':'
+ IntToStr(Bindings[i].Port)
);
end;
end;
This code does get executed as it should at init time.
Now unfortunately, that doesn't solve the issue, that is that the server
never enters the OnFileRead event (and doesn't send any reply on any
NIC) when
1) there is more than one local IP address and
2) it receives a TFTP read file query on any interface.
Currently, I only intercept and process OnReadFile and
OnTransferCompleted: According to the documentation, that seems to be
enough, and that's actually enough to get things working with a single IP.
When there is more than one IP, the server still goes active, doesn't
throw any error or exception, but the OnReadFile event is never gets
called and the TFTP server doesn't seem to do anything.
Is there anything else that I'm not doing (but should)?
The Indy 10 version I use seems to be the latest (it says 10.1.5 in
iDVers.inc).
TIA, /Ph.