 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Jonny Guest
|
Posted: Wed Sep 28, 2005 8:01 am Post subject: passive mode |
|
|
Hi,
I'am using indy9 ftp server.
I want to use passive mode.
Does anyone know what the eventhandler
for PASV would look like ?
Kind regards
Jonny
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Wed Sep 28, 2005 4:46 pm Post subject: Re: passive mode |
|
|
"Jonny" <jonny.heyman (AT) cekab (DOT) se> wrote
| Quote: | I'am using indy9 ftp server.
I want to use passive mode.
Does anyone know what the eventhandler
for PASV would look like ?
|
Indy 9 TIdFTPServer already supports PASV. You do not need to implement it
yourself. If you are trying to customize the IP/port that is sent to the
client, instead of using the default values that TIdFTPServer automatically
calculates, then you can use the OnPASV event for that, ie:
procedure TForm1.IdFTPServer1Pasv(ASender: TIdFTPServerThread; var VIP :
String; var VPort : Word);
begin
VIP := 'Whatever IP address the client should connect to';
VPort := WhateverPortNumberTheClientShouldConnectTo;
end;
About the only time you would ever want to customize the IP/port manually is
if your server machine is running being a router with port forwarding
enabled, since the client will connect to the router directly instead of the
server and thus needs to know the router's IP/port instead of the server's.
Gambit
|
|
| Back to top |
|
 |
Jonny Guest
|
Posted: Fri Sep 30, 2005 12:43 pm Post subject: Re: passive mode |
|
|
Thank's a lot
Jonny
"Remy Lebeau (TeamB)" <no.spam (AT) no (DOT) spam.com> skrev i meddelandet
news:433ac8d6$1 (AT) newsgroups (DOT) borland.com...
| Quote: |
"Jonny" <jonny.heyman (AT) cekab (DOT) se> wrote in message
news:433a4d21$1 (AT) newsgroups (DOT) borland.com...
I'am using indy9 ftp server.
I want to use passive mode.
Does anyone know what the eventhandler
for PASV would look like ?
Indy 9 TIdFTPServer already supports PASV. You do not need to implement
it
yourself. If you are trying to customize the IP/port that is sent to the
client, instead of using the default values that TIdFTPServer
automatically
calculates, then you can use the OnPASV event for that, ie:
procedure TForm1.IdFTPServer1Pasv(ASender: TIdFTPServerThread; var VIP
:
String; var VPort : Word);
begin
VIP := 'Whatever IP address the client should connect to';
VPort := WhateverPortNumberTheClientShouldConnectTo;
end;
About the only time you would ever want to customize the IP/port manually
is
if your server machine is running being a router with port forwarding
enabled, since the client will connect to the router directly instead of
the
server and thus needs to know the router's IP/port instead of the
server's.
Gambit
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|