EE450 Socket Programming Project Fall 2013

The directory server is responsible for creating a

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: .cpp, file_server2.cpp and file_server3.cpp. 3. Client - The name of this piece of code must be client.c or or client.cpp (all small letters) and the header file (if any) must be called client.h (all small letters). You must follow this naming convention. . In case you are not using fork(), you must create 2 instances of this code namely, client1.c, client2.c or, or client1.cpp, client2.cpp Phase 1: (Registration) In the First Phase of the Project, what we have is the Registration Process. The File Servers connect with the Directory Server through static UDP connections and informs the Directory Server of their TCP Port Numbers which the clients would be using in Phase 3 to download the required resources. The Directory Server is responsible for creating a new text document “directory.txt” which will contain the required information. Phase 2: (Resource Discovery) In this phase clients place a request for the file to the Directory server. The Directory server will check resource.txt to find out which file servers has this file. In case of multiple file servers having the requested file, Directory server looks into the topology.txt to find the nearest file server to the client. Directory server will now send back file server name and its TCP port number to the Client. Phase 3: (File Sharing) In this phase, clients establish a TCP connection with the File server by using the File server name and port number they got from Directory Server in...
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