Question
The application is a KnockKnock joke generator where the client connects to the server and you ask it a KnockKnock joke. The joke protocol goes
The application is a KnockKnock joke generator where the client connects to the server and you ask it a KnockKnock joke. The joke protocol goes like this: Server: "Knock knock!" Client: "Who's there?" Server: "Dexter." Client: "Dexter who?" Server: "Dexter halls with boughs of holly." Client: "Groan."
1. Download the KnockKnockServer.java file from our class Website Knock Knock Server KnockKnockServer.java 2. Copy and paste the client code from the following link. Client code is here: Client Code for Lab. Save it in a file called KnockKnockClient.java Compile the .java files. 3. Open up two windows on your local machine and communicate between client and server using the KnockKnock protocol. In other words, tell jokes between the client and server. Use the command line to start the server: java KnockKnockServer and in the second window, type: java KnockKnockClient 4. Optional, you can change the jokes if you like. 5. If you are in the Lab, you can trade IP addresses with a neighbor and recompile your Client programs. Now one of you start up the server and one start his/her client. Tell jokes between machines. Then, reverse the process and do it again to get the feel of connecting to a Server on a different machine. If you are doing the lab at home, just skip this step.
After getting the chance to try out both the client and server KnockKnock programs, answer the questions below.
Questions .
- What happens if you have the wrong IP address of the host where the server is running? Hint: Try it!
- How do you look up the IP address of your own machine in Linux?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started