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...

There are no default cell margin settings

Indicate whether the statement is true or false

Computer Science & Information Technology

A file's ____________ marks the location of the next item that will be read from the file.

a. line marker b. index value c. read position d. newline character

Computer Science & Information Technology