Question: how tcp connection is established?
Answer: To establish a connection, TCP uses a three-way handshake. Before a client attempts to connect with a server, the server must first bind to and listen at a port to open it up for connections: this is called a passive open. ... ACK: Finally, the client sends an ACK back to the server.