|Subject:||Re: FTP Server Does not open data port|
|Posted by:||Remy Lebeau (TeamB) (email@example.com)|
|Date:||Tue, 14 Dec 2004|
"Roberto Stern" <rober…@stern.com.br> wrote in message
> I have a FTPServer developed in Delphi and a high load of uploads block
> some users from uploading/downloading. They receive the message "Could Not
> Bind Socket. Address and port are already in use".
> They are all using PASSIVE mode.
You did not specify which version of Indy you are using.
If Indy 9, then all transfers try to use the same port number by default,
which will not work in a multi-transfer scenerio. One way around the issue
is to change the DefaultDataPort property to 0, which means that all
transfers will use random ports, ensuring that multiple transfers do not try
to use the same port at the same time. The downside to this approach,
though, is that it does not work very well if your server is behind a
firewall. In which case you have to use the OnPASV event to limit the ports
that can be used for transfers.
If Indy 10, then all of the above still applies, except that the OnPASV
event is broken up into OnPASVBeforeBind and OnPASVReply events instead.
FTP Server Does not open data port posted by Roberto Stern on Tue, 14 Dec 2004