i m trying to make an ftp server ..
a ftp server accepts a connection at some port say 7000 check for the user name and password ok fine till now
but if all is working well till now , but how the hell he sends the file to the client when client wants a particular file ?
even bigger question how the ftp server connects through port 21 for sending the files because port 21 is used for ftp in which case the ftpserver will throw an exception saying that port is already binded something like that
hope you got it what i am telling ?
if any one knows typical implementation of ftpserver please let me know
thanks
naved momin wrote:i m trying to make an ftp server ..
You mean you're trying to write an FTP server in Java? Don't do that.
a ftp server accepts a connection at some port say 7000 check for the user name and password ok fine till now
but if all is working well till now , but how the hell he sends the file to the client when client wants a particular file ?
even bigger question how the ftp server connects through port 21 for sending the files because port 21 is used for ftp in which case the ftpserver will throw an exception saying that port is already binded something like that
hope you got it what i am telling ?
Yes. There is a specification for what FTP servers are supposed to do. Implementers should find that specification, read it, and understand it.
if any one knows typical implementation of ftpserver please let me know
The typical implementation of an FTP server these days is to get an FTP server from somewhere else and install it on the machine where it is supposed to run. I recommend you do that.
Tim Moores
Rancher
Joined: Sep 21, 2011
Posts: 2407
posted
0
As I've told you elsewhere, check out Apache Mina for an open source FTP server written in Java.