Article View: news.software.misc
Article #2800Network Programming Need Help
From: sat
Date: Sat, 08 Dec 2001 20:47
Date: Sat, 08 Dec 2001 20:47
53 lines
2793 bytes
2793 bytes
Please help me on the socket programming. This is the statement Problem Description: Write two separate programs, client.c and server.c, to implement a simplified version of FTP. The server process should work in connection-oriented and concurrent-server mode. You need to first start the server process in a server host and publish its host name and port number. A user on another host can then issue a command like %myftp server-host-name server-port-number to download a file from or upload a file to the server. After accepting the above myftp command, the client process should responds with prompt ftp>, waiting for user’s ftp commands. Requirements: 1) myftp is so named as to tell from the standard ftp command. 2) You need to consider the following ftp commands: ftp>put filename to upload a file named filename to the server, ftp>get filename to download a file named filename from the server, ftp>ls to list the files under the present directory of the server, ftp>cd to change the present directory of the server, ftp>pwd to display the present working directory of the server ftp>!ls to list the files under the present directory of the client, ftp>!pwd to display the present working directory of the client, ftp>!cd to change the present directory of the client, ftp>quit to quit from ftp session and return to Unix prompt. 3) Other commands except the above ones are considered as invalid ftp commands. When a user inputs an invalid ftp command, your program should respond with “An invalid FTP command.” 4) If command ls is followed by invalid options, or if cd is followed by a non-existed directory, your program should also respond with proper error message. 5) When a user puts or gets a non-existed file, your program should respond with “filename: no such file.”
Technical Details
Message-ID:
<e37c4826.0112081247.7c2e5ff5@posting.google.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.misc.mbox.zip!archiver1.google.com!postnews1.google.com!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <e37c4826.0112081247.7c2e5ff5@posting.google.com> Subject: Network Programming Need Help Date: Sat, 08 Dec 2001 20:47:55 +0000 From: dirbamandi@yahoo.com (sat) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.misc.mbox.zip!archiver1.google.com!postnews1.google.com!not-for-mail Newsgroups: news.software.misc Organization: http://groups.google.com/ Lines: 52 NNTP-Posting-Host: 141.217.173.37 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1007844476 10517 127.0.0.1 (8 Dec 2001 20:47:56 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 8 Dec 2001 20:47:56 GMT