Building Java Client/Server Applications with TCP. Part 4

The greeting client-server program

We’ll also present a greeting program, that emulates a communication protocol between a client and a server.

The server will start on a given port and wait for the connection of a client. It will read the greeting of the client and answer to it. This is how the server code looks like:

Read more at —

Originally published at