• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FTP-Protocol: PORT question

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi !
i'm currently trying to implement an applet-based ftp client.
i got it as far as i get ascii responses from the server, but when i say sth like "LIST", the server replies that he can't open the required connection.
are binaries and directory listings being transmitted via a different socket ??? does this have to do with the PORT command ??
thanks in advance,
Dennis
 
Joel Peach
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dennis,
This is absolutely the case! FTP employs two connections, a "control" connection which is the one that you have opened up. This is the initial connection used to send commands between the client and sever. The second connection is the "data" connection which, as the name implies, is where the data is piped.
If you haven't already, check out RFC 959
http://www.faqs.org/rfcs/rfc959.html
This is the FTP standard specification that will explain in detail (but is still quite readable for an RFC) how the FTP model functions.
Best of luck!
-Joel
 
Tom Ben
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a working FTP package that is written in Java that I downloaded from the internet. It works great and saved me the time of having to do it myself. If you would like it just contact me with your email address and I will send it.

------------------
Sun Certified Programmer on the Java 2 Platform
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That would be wicked. Even though I'm doing it for my studies, it's good to have sth to compare to.
eMail: dennis.kuehn@gmx.net
thanks a lot, Tom.
 
suheel hussain
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tom,
Just what I was looking for! Could you give me the URL or
better send me the package @ suheelh@nc.rr.com. Would appreciate
it.
-suheel
 
Jim Wang
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tom:
May I have a copy of your FTP code too? My email is jim20653@hotmail.com .
Thanks.
Jim
 
Tom Ben
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java Ftp Download
Hopes this helps everyone.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic