Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me, this is computer network class. I will give you an up vote Socket Programming: TCP Client and Server Part #1 Create two

image text in transcribedimage text in transcribedimage text in transcribed

Please help me, this is computer network class. I will give you an up vote

Socket Programming: TCP Client and Server Part \#1 Create two Java files, one called tcp_client.java and one called tcp_server.java. The client should be able to send one message to the server and when the server receives that message, it will capitalize all the letters in that message and send the modified message back. Upon receiving the modified message, the client should close, but the server should remain running, waiting for another connection. Hint: You will need to run these programs simultaneously so you will need to run them in separate terminal or cmd windows. Part \#2: Reverse Message Now let's change how the server manipulates the message. Instead of capitalizing the message, reverse it. For example, if the client sends the message "How are you?", the server will respond with the message "?uoy era woH". Hint: For this part all you must modify is the server file. Client Output: (hacol I adyRugcmpoz5A.Comnuter Networks aajachristie\$ java tcp_client How are you? FROM SERVER: ?uoy era woH Tvasc; Lady Note: The server output will look the same as part 1 but the client output will show the reversed message. Part \#3: More Messages Now we will allow the client to send as many messages as it wants. Instead of ending the program after receiving the modified message from the server, we will allow the client to keep sending messages until it sends the word "end" to the server. Once the word "end" is sent to the server the program will end after receiving the server's response to that "end" message. Hint: For this part all you must modify is the client file. Client Output: (hace) I advRuacMRP254.Comnuter Networks aajachristie\$ java tcp_client Hi FROM SERVER: iH Hello FROM SERVER: olleH Wus good? FROM SERVER: ? doog suW end FROM SERVER: dne Note: The client keeps sending messages until it sends the word "end" then the program ends after that response. Part \#4: Multiple Clients Connect two clients to the server and take turns sending messages to the server. What do you notice? How is the server responding? Why do you think the server responding this way

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

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

9th Edition

0135188148, 978-0135188149, 9781642087611

More Books

Students also viewed these Databases questions

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago