TCP is a connection-oriented protocol. Before either end can send data to the other, a connection must be established between them. In this chapter we take a detailed look at how a TCP connection is established and later terminated.
This establishment of a connection between the two ends differs from a connectionless protocol such as UDP. We saw in Chapter 11 that with UDP one end just sends a datagram to the other end, without any preliminary handshaking.
To see what happens when a TCP connection is established and then terminated, we type the following command on the system
svr4 % telnet bsdi discard Trying 184.108.40.206 ... Connected ...