Question: 4. Servers are supposed to run for a long time without stoppingtherefore, they must be designed to provide good service no matter what their clients
4. Servers are supposed to run for a long time without stoppingtherefore, they must be designed to provide good service no matter what their clients do. Examine the server TCPEchoServer.java and list anything you can think of that a client might do to cause it to give poor service to other clients. Suggest improvements to fix the problems that you find.
5. Based on your answers to Question 4, or more specifically, your answers to "Examine the server TCPEchoServer.java and list anything you can think of that a client might do to cause it to give poor service to other clients," and revise TCPEchoClient.java to implement such a client, which I call a bad client. Your bad client should attempt to cause the server to provide poor services, in at least 2 different ways. (5 points, 2.5 for each bad behavior)
6. Based on your answers to Question 4 and 5, or more specifically, your answers to "Suggest improvements to fix the problems that you find," revise TCPEchoServer.java to incorporate those improvements. You can call this improved server a bullet-proof server. (5 points, 2.5 for each improvement)
TCPEchoServer.java

TCPEchoClient.java

import java.net.* I/ for Socket, ServerSocket, and InetAddress 5 import java.io.*; /7 for IOException and Input/OutputStrearm 6 7 public class TCPEchoServer 9 private static final int BUFSIZE= 32; // Size of receive buffer 10 11e public static void main(String[I args) throws IOException 12 13 14 15 16 17 18 19 20 21 if (args.length !-1) // Test for correct # of Aras throw new IllegaLArgumentExceptionC" Parameter(s):
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
