Article View: borland.public.cppbuilder.internet.socket
Article #3405Re: passive mode
From: Remy Lebeau (TeamB)
Date: Wed, 28 Sep 2005 16:46
Date: Wed, 28 Sep 2005 16:46
28 lines
2141 bytes
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
Technical Details
Message-ID:
<433ac8d6$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!elnk-atl-nf1!newsfeed.earthlink.net!nx02.iad01.newshosting.com!newshosting.com!193.190.198.17.MISMATCH!syros.belnet.be!news.belnet.be!newsfeed.cw.net!news-FFM2.ecrc.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<433a4d21$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,f05d036eee2f8dd X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <433a4d21$1@newsgroups.borland.com> Subject: Re: passive mode Date: Wed, 28 Sep 2005 09:46:36 -0700 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <433ac8d6$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1127925974 68.69.17.41 (28 Sep 2005 09:46:14 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!elnk-atl-nf1!newsfeed.earthlink.net!nx02.iad01.newshosting.com!newshosting.com!193.190.198.17.MISMATCH!syros.belnet.be!news.belnet.be!newsfeed.cw.net!news-FFM2.ecrc.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail