SCMP 318 – Client-Server Name Program

Goal

To get the client/server version of the name web program working on the class server

Method

You can choose either the C++ version or the Python version, which ever you plan to do your programming with on the first lab.

C++

Steps:

1. Use git to clone the project on you server:

Python:

git clone https://github.com/jimskon/PythonNameLookupCS.git

C++:

git clone https://github.com/jimskon/NamesClientServer.git

2. Edit the files to make the project work for you (instead of “skon”)

Edit “Makefile”. Change “user=skon” to “user=yourusername

Edit “namelookup.js”. Near the bottom change:

Python:

    url: '/cgi-bin/skon_namelookupCS.py?name='+searchStr+'&type_select='+searchType, 

to

    url: '/cgi-bin/yourusername_namelookupCS.py?name='+searchStr+'&type_select='+searchType, 

C++:

    url: '/cgi-bin/skon_namelookupCS.cgi?name='+searchStr+'&type_select='+searchType, 

to

    url: '/cgi-bin/yourusername_namelookupCS.cgi?name='+searchStr+'&type_select='+searchType, 

3. Create the directories for your project in the web directory, and make yourself own these folders (change “skon” to your username):

Python:

mkdir /var/www/html/class/softdev/yourusername/pNameserver               

C++:

mkdir /var/www/html/class/softdev/yourusername/Nameserver              

4. Change the Fifo name:

C++:

In fifo.h change: #define SIG “Skon_” to be your name.

Python:

In nameclient.py, nameTestClient.py and nameserver.py change:

fifoname="py" # Unique name for fifos             

to be your name instead f “py”

5. Make the project:

make

6. Go to the application and test it out! (Use your server ip address)

Run the server. Then try the test client. then try the web page.

Turn in:

A lik to your web page, and the file path to your project.

Scroll to Top