Run the programs by starting the server EchoServer3 (don’t forget to specify a port number as a command-line argument) first, then the client EchoClient2. Conduct a session and observe the diagnostic messages displayed on both sides. Describe your observation of the sequence of events.

This exercise deals with EchoServer3. Recall that EchoServer3 is connection-oriented and concurrent.
Compile Echo*3.java (“javac Echo*3.java”). Then:


A sample session is attached. The two clients each obtains a connection with the server, and each interacts with the server to repeatedly send a message and receive an echoing message, each ending its session with a ‘.’.
A sample of the run outputs is attached.
```
>java EchoServer3 12345
Daytime server ready.
Waiting for a connection.
connection accepted
Waiting for a connection.
connection accepted
Waiting for a connection.
message received: I am first
message received: I am second.
message received: first again
message received: second again
message received: .
Session over.
message received: .
Session over.

>java EchoClient2
Welcome to the Echo client.
What is the name of the server host?
localhost
What is the port number of the server host?
12345
Connection made
Enter a line to receive an echo back from the server, or a single peroid to quit
.
I am first
I am first
Enter a line to receive an echo back from the server, or a single peroid to quit
.
first again
first again
Enter a line to receive an echo back from the server, or a single peroid to quit
.
.
>java EchoClient2
Welcome to the Echo client.
What is the name of the server host?
localhost
What is the port number of the server host?
12345
Connection made
Enter a line to receive an echo back from the server, or a single peroid to quit
.
I am second.
I am second.
Enter a line to receive an echo back from the server, or a single peroid to quit
.
second again
second again
Enter a line to receive an echo back from the server, or a single peroid to quit
.
.
```

Computer Science & Information Technology

You might also like to view...

The while loop is a(n) ________ loop, whereas the do-while loop is a(n) ________ loop.

A) finite, infinite B) infinite, finite C) simple, complex D) pretest, post test E) post test, pretest

Computer Science & Information Technology

A(n) ________ is a device that reads information from a magnetic strip on the back of a credit card-like identification card

Fill in the blank(s) with correct word

Computer Science & Information Technology

Input and output components are ________

A) never visible to the user B) contained inside the system unit C) never portable D) visible to the user

Computer Science & Information Technology

To allow your document to be read or edited in a program other than Word, you should save the document as a(n):

A) RTF file. B) TXT file. C) HTML file. D) docx file.

Computer Science & Information Technology