Socket programming and networking examples in Java.
Usually TCP/IP connection is opened by a client, to the server. Then, communication is started by the client with server. When it is done, connection is closed. Itís illustration is as following: Java TCP Networking Basics
One or more than one requests could be sent by a client via an open connection. Connections can be closed by server, if needed.