Each team will develop and deploy an echo server application which can handle si
ID: 3775782 • Letter: E
Question
Each team will develop and deploy an echo server application which can handle simultaneous connections and request processing. Make sure to record all your planning and decisions during design, development and deployment of your application and The server application should be equipped with two options of encryption and decryption options as follow: If a plain text message sent with encryption option, then the server will reply back with encrypted message. If no option is provided your server will return the message back as is. Adding hash algorithm to provide message digest feature is optional. Your group should work on a plan to determine limits of your application by planning and deploying DOS attack on your server application. Then compile a report of your assessment of your system and why and how your plan is a good indicator for performance measurement. You also need write a separate peer review/report for an assigned group to include the following: Testing their server application Testing the limits (under what conditional the server will not be responsive.) How and why did you plan your performance assessment tests. Your be able to keep a log of all connections and your group report should connection attempts, type of requests and etc..Explanation / Answer
echo server application in java:
Echo.Client.java
import java.io.*;
import java.net.*;
public class EchoClient
{
public static void main(String[] args)
{
try
{
Socket s = new Socket("127.0.0.1", 9999);
BufferedReader r = new BufferedReader(new InputStreamReader(s.getInputStream()));
PrintWriter w = new PrintWriter(s.getOutputStream(), true);
BufferedReader con = new BufferedReader(new InputStreamReader(System.in));
String line;
do
{
line = r.readLine();
if ( line != null )
System.out.println(line);
line = con.readLine();
w.println(line);
}
while ( !line.trim().equals("bye") );
}
catch (Exception err)
{
System.err.println(err);
}
}
}
output:
EchoServer
:/>javac EchoServer.java
:/>java EchoServer
EchoClient
:/>javac EchoClient.java
:/>java EchoClient
Welcome to the Java EchoServer. Type 'bye' to close.
HAI
Got: HAI
Hello
Got: Hello
bye
Press any key to continue ….
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.