🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.socket
3 messages
3 total messages Started by Jonny Wed, 28 Sep 2005 08:01
passive mode
#3404
Author: Jonny
Date: Wed, 28 Sep 2005 08:01
7 lines
1047 bytes
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 
Re: passive mode
#3405
Author: Remy Lebeau (TeamB)
Date: Wed, 28 Sep 2005 16:46
28 lines
2141 bytes
"Jonny" <jonny.heyman@cekab.se> wrote in message
news:433a4d21$1@newsgroups.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
Re: passive mode
#3414
Author: Jonny
Date: Fri, 30 Sep 2005 12:43
41 lines
2423 bytes
Thank's a lot
Jonny

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> skrev i meddelandet 
news:433ac8d6$1@newsgroups.borland.com...
>
> "Jonny" <jonny.heyman@cekab.se> wrote in message
> news:433a4d21$1@newsgroups.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
>
> 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads