Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ We wish to implement a client-server fortune telling package. This will be based upon the echo server discussed in lecture. Note that we will

C++

We wish to implement a client-server fortune telling package. This will be based upon the echo server discussed in lecture. Note that we will not concern ourselves at this point with issues of security.

You will need to implement two programs:

client: An application that opens a client connection to the server application and requests a fortune to be send back to the client.

server: The server application listens on a socket for fortune requests. It needs to respond to incoming request by randomly selecting a fortune string from a vector of fortunes loaded when the server starts. The server needs to be able to handle multiple connections at the same time.

Implement this simple client/server application using sockets. There is no preferred programming language for this assignment... use what you're most comfortable using for code-slinging. Your applications should use port 9876 for both listening and responding.

You are required to implement a sufficient test suite to test your solution and this must be included with your submission.

Test data:

I am not strange. I am just not normal. - Salvador Dali Where there's a will, I want to be in it. The last thing I want to do is hurt you. But it's still on my list. Since light travels faster than sound, some people appear bright until you hear them speak. If I agreed with you, we'd both be wrong. We never really grow up, we only learn how to act in public. War does not determine who is right - only who is left. Knowledge is knowing a tomato is a fruit.. Wisdom is not putting it in a fruit salad. To steal ideas from one person is plagiarism. To steal from many is research. I didn't say it was your fault, I said I was blaming you. In filling out an application, where it says, 'In case of emergency, Notify:' I put 'DOCTOR'. Women will never be equal to men until they can walk down the street with a bald head and a beer gut, and still think they are sexy. You do not need a parachute to skydive. You only need a parachute to skydive twice. I used to be indecisive. Now I'm not so sure.. To be sure of hitting the target, shoot first and call whatever you hit the target. Going to church doesn't make you a Christian any more than standing in a garage makes you a car. You're never too old to learn something stupid. I'm supposed to respect my elders, but its getting harder and harder for me to find one. Being a professional is doing the things you love to do, on the days you dont feel like doing them. - Julius Erving If anything is worth doing it is worth doing in style, and on your own terms, and nobody's ********* else's! - Lucius Beebe If you must choose between two evils, pick the one you've never tried before. Get rid of all bitterness, rage and anger, brawling and slander, along with every form of malice. Be kind and compassionate to one another, forgiving each other, just as in Christ God forgave you. ~ Ephesians 4:31-32 Be nice to nerds. Chances are you'll end up working for one. - Bill Gates And this, our life, exempt from public haunt, finds tongues in trees, books in the running brooks, sermons in stones, and good in everything. William Shakespeare The world is a tragedy to those who feel, but a comedy to those who think." --Horace Walpole It is good taste, and good taste alone, that possesses the power to sterilize and is always the first handicap to any creative functioning. - Salvador Dali Each morning when I awake, I experience again a supreme pleasure - that of being Salvador Dali. - Salvador Dali Have no fear of perfection - you'll never reach it. - Salvador Dali I do not paint a portrait to look like the subject, rather does the person grow to look like his portrait. - Salvador Dali I don't do drugs. I am drugs. - Salvador Dali The only difference between me and a madman is that I'm not mad. - Salvador Dali I am a firm believer in the people. If given the truth, they can be depended upon to meet any national crisis. The great point is to bring them the real facts, and beer."  Abraham Lincoln This dying is boring.  Richard Feynman, last words before his death. I invented the CTRL-ALT-DELETE but Bill Gates made it famous. - D. Bradley, developer on the orig. IBM PC design team. Don't confuse me with facts, my mind's already made up. I am a strong believer in luck and I find the harder I work the more I have of it. - Benjamin Franklin The foundation of every state is the education of its youth. - Diogenes

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine Ricardo

2nd Edition

1449606008, 978-1449606008

More Books

Students also viewed these Databases questions