For this lab, you need to build a very simple client-server operation using the Unix stream capabilities. This is as described earlier. That is, you are going to communicate between two programs, but they are going to reside on the same host. This is a fairly easy thing to do, but small mistakes can be inordinately difficult to find in communication software. Be careful!

You are to build a client and server pair, to implement your own little directory service. Suppose that the server has the following database

0 Bob
3 Anne
5 Barb
7 Ray
9 Denbigh
10 Terri 104 John

This can be in a file that is read, or it can be a static array in your program - I really don't care about the niceties at this point.

The client is to read a request, which is a numeric address to be sent to the server. The server looks up the matching name and send it back to the client to be printed out. If the address isn't found, the server should send back an error message. For example, "Address not found".

Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.