Question: For this assignment, you will write a multitareaded file server program. The server makes a collection of files available for transmission to clients. When a



For this assignment, you will write a multitareaded file server program. The server makes a collection of files available for transmission to clients. When a cliemt connects to the server, the server fint reads a eoe-tine command from the client. The command can be: - The string "L.IST". In this case, the server responds by sealing a list of names of all the files that are available on the server. - Or the command can be of the form "GET filename>", where clikenamp is a file name. The server checks whether the requested fille ecuiss. If se, it seds "OK" as a message to the client. Thea it sends the centents of the file and cleses the cuenection. Otherwise, it sends a line beginning with the woed "ERROR" 10 the clicnt. The server can also respond with the message "umknown coenmune if the command it reads is not one of the two possable legal coenmands.). A akeleton of the server program is artached with the assignment. For all the three cases, the server must return a thread ID to the client. Your program should use a thrcad class to handile each requet that the server receives. It should not stop after handling one request; it should remain open and contince to accept new requests. Test your file server for the following cases: - Single client - 2 to 4 clicnts - 2 clients dowalouding the same file. II. Deliverables 1. Client program 2. Server program 3. Report 4. Readme The roport must contain: The floweharts of the programs, scromshos of nunniag elsents and server with their dsseription. And the Readme file mast coetain the enecutine sectario of the project. 1II. Gradiage Creation of inper and ostput streams: 10% Server processing of client commands (list-get-errot): 15\%: Concurtent clients connections (4 clicnts): 29%; Client peocessing of uver inputs: 10% Client download /creation of a file: 10s. Design (flowcharts) $% Coding style (classes - variables - methods - comments) 1% Correct steps in Readme: 10% Report: 5%
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
