Connection-Oriented vs. Connectionless Communication
There are two primary approaches to communicating between applicationsconnection oriented and connectionless. Connection-oriented communications are similar to the telephone system, in which a connection is established and held for the length of the session. Connectionless services are similar to the postal service, in which two letters mailed from the same place and to the same destination may actually take two dramatically different paths through the system and even arrive at different times, or not at all.
In a connection-oriented approach, computers send each other control informationthrough a technique called handshakingto initiate an end-to-end connection. The Internet is an unreliable network, which means that data sent across the Internet may be damaged or lost. Data is sent in packets, which contain pieces of the data along with information that helps the Internet route the packets to the proper destination. The Internet does not guarantee anything about the packets sent; they could arrive corrupted or out of order, as duplicates or not at all. The Internet makes only a "best effort" to deliver packets. A connection-oriented approach ensures reliable communications on unreliable networks, guaranteeing that sent packets will arrive at the intended receiver undamaged and be reassembled in the correct sequence.
In a connectionless approach, the two computers do not handshake before transmission, and reliability is not guaranteeddata sent may never reach the intended recipient. A connectionless approach, however, avoids the overhead associated with handshaking and enforcing reliabilityless information often needs to be passed between the hosts.