Connection-oriented communication is a network communication mode in telecommunications and computer networking, where a communication session or a semi-permanent connection is established before any useful data can be transferred, enabling the ability to ensure that data is delivered in the correct order to the upper communication layer. The alternative to connection-oriented transmission is connectionless communication, for example the datagram mode communication used by the IP and UDP protocols, where data may be delivered out of order, since different network packets are routed independently, and may be delivered over different paths.