ftp server in C
I have to develop 1 FTP (simple) server in C.<br>
What do i mean with _simple_??
I mean that FTP server has to support:<br>

 1. authentication (USER, PASS, PORT)
 2. change directory (CD)
 3. file listing (LIST)
 4. file retrive (RETR)

I have just developed as "split part" the numbers 1-2-3-4 and i have to merge them into _main.c_. So no problem with them.<br>
What i don't understand is how to "receive" communications from the client.<br>I mean how can implement what the client wants (USER, PASS, CD, LIST, RETR)?<br>
I've read the rfc959 but i have not totally understood the communication between client and sever.<br>
Summary:

 1. client connect to server (so into the server this part is the socket "accept(..)"), rigth?
 1a server send to client "you are connected" right?
 2. client send to server user,password (file 1, auth.c but i don't know how to read when client send to the server the user and password request)
 3. after successful login the server send file list (part 3, list.c, no problem)
 4. the client send to the server the file it wants to download or the changedir command (again, how to read this info from client's request?)<br>

i hope you have understand :)
ftp server in C
===

I have to develop 1 FTP (simple) server in C.<br>
What do i mean with _simple_??
I mean that FTP server has to support:<br>

 1. authentication (USER, PASS, PORT)
 2. change directory (CD)
 3. file listing (LIST)
 4. file retrive (RETR)

I have just developed as "split part" the numbers 1-2-3-4 and i have to merge them into _main.c_. So no problem with them.<br>
What i don't understand is how to "receive" communications from the client.<br>I mean how can implement what the client wants (USER, PASS, CD, LIST, RETR)?<br>
I've read the rfc959 but i have not totally understood the communication between client and sever.<br>
Summary:

 1. client connect to server (so into the server this part is the socket "accept(..)"), rigth?
 1a server send to client "you are connected" right?
 2. client send to server user,password (file 1, auth.c but i don't know how to read when client send to the server the user and password request)
 3. after successful login the server send file list (part 3, list.c, no problem)
 4. the client send to the server the file it wants to download or the changedir command (again, how to read this info from client's request?)<br>

i hope you have understand :)