🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #1580

Re: Writing an FTP Server

#1580
From: Remy Lebeau (TeamB)
Date: Thu, 30 Sep 2004 17:31
31 lines
1920 bytes
"Colin B Maharaj" <noreply@myhost.com> wrote in message
news:415befb1$1@newsgroups.borland.com...

> has anyone written an FTP server?

Yes.

> I am in the process of writing a simple one at the moment

I would suggest that you use a pre-made FTP component rather than writing
your own code from scratch.

> the PASV command seems tricky any ideas...

What is so tricky about it?  When you receive a PASV request, simply open
another listening server socket and then send back the IP and port that it
is listening on.  When the client performs a file transfer afterwards, the
client will connect to that second socket and send the data over it.  When
no PASV command has been sent yet before a transfer, there is no second
socket available on your server's end, so the client would have to open its
own server socket which your server would then connect to instead for the
transfer.

> Is the source for the IdFTP (client they have no server)
> available anywhere???

Yes.  Indy is open-source, the full source code is always available.


Gambit
Technical Details
Message-ID: <415c42ea@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <415befb1$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,9c17f47513721dc1
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.web
References: <415befb1$1@newsgroups.borland.com>
Subject: Re: Writing an FTP Server 
Date: Thu, 30 Sep 2004 10:31:28 -0700
Lines: 33
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: <415c42ea@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1096565482 68.69.17.41 (30 Sep 2004 10:31:22 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail