TCP: Transmission control protocol - 401-advanced-javascript-jv/seattle-javascript-401d30 GitHub Wiki
TCP is a connection-oriented means of communication where the application/client and the server establish a connection and maintain it in an active state until the client is done with everything it wants to do.
The server opens a port, which you can specify, and waits for connections from clients. Once a client connects, the server is notified of the connection and has a chance to do something with that information. Common things to do when a server receives a connection involve saving the details so the connection can be used later. For instance, it might be a good idea to set a 'close' listener on the connection so the server can deal with the aftermath of a closed connection.