The process initiates the connection from one of its local ports to a port on the second host with a special series of packets. In order to recognize the incoming connection and respond, the second process must have a process listening on the correct port. The client is the connecting process and the server is the listener.
The initiation of a TCP connection involves a process selecting a local port and connecting it to a port on a second host using a series of special packets. For successful communication, the second process must actively listen on the designated port. In this context, the connecting process is termed the client, while the listening and responding process is the server.