EE450 Socket Programming Project Fall 2013

Txt already exists in the same working directory with

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: phase 2. After the file server receives the request for the file from the Client, It will send the requested file to the client. More Detailed Explanation: Phase1: The Directory Server creates a static UDP connection (check the corresponding Phase Table for the Static Port number to be assigned to it). Along with this the File servers should also create 3 static UDP Ports as per the information in the Table. After a connection is established between a file server and the Directory Server, the file server sends the following message to the Directory Server: “File_Server# TCP_Port_No” As an example, the message could be: “File_Server1 9099” (without quotes) It must also create a text file, directory.txt (you must use this name for the text file). Please note that the directory_server creates the file directory.txt only ONCE and then writes the information to it every time a new file_server registers itself with the directory_server. Do NOT create 3 individual files!! Also note that the directory server must first check whether a file by the name of directory.txt already exists in the same working directory with the rest of your code or not. If yes, it needs to overwrite the old one with a new one. When your code is tested for a second time, the contents of the directory.txt must be overwritten every time and the new info must NOT be appended to the old info. So, after the process is over the directory.txt file could contain the following as an example: File_Server1 8000 File_Server2 9000 File_Server2 1...
View Full Document

This document was uploaded on 02/26/2014 for the course EE 450 at USC.

Ask a homework question - tutors are online