Question: Q 4 ( 3 0 pts ) . Write the necessary JAVA classes to implement a simple Server running on Port 2 0 2 3
Q pts Write the necessary JAVA classes to implement a simple Server running on Port serving multiple
concurrently. Assume that the clients will always send a message in the following format requestid requesttype, payloas
server, upon receiving a request, should identify the requesttype and send back a reply accordingly. The table below show
request types and the corresponding replies. Also, the requesttype OxA should tear down the streams and the socke!
Your server will send the replies in the same message format. The reply should contain a requestjd the same request.
the reply content as the payload. Please pay attention that, you are not required to code the client class or the main classWrite the necessary JAVA classes to implement a simple Server running on Port serving multiple clients concurrently. Always send a message in the following format requestid requesttype, payload Your server, upon receiving a request, should identify the requesttype and send back a reply accordingly. The table below shows the request types and the corresponding replies. Also, the requesttype OxA should tear down the streams and the socket session. Your server will send the replies in the same message format. The reply should contain a requestid the same request type and the reply content as the payload.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
