BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

passive mode

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Internet Socket)
View previous topic :: View next topic  
Author Message
Jonny
Guest





PostPosted: Wed Sep 28, 2005 8:01 am    Post subject: passive mode Reply with quote



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





PostPosted: Wed Sep 28, 2005 4:46 pm    Post subject: Re: passive mode Reply with quote




"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





PostPosted: Fri Sep 30, 2005 12:43 pm    Post subject: Re: passive mode Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Internet Socket) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.