In computer networking, the transport layer is a conceptual division of methods in the layered architecture of protocols in the network stack in the and the Open Systems Interconnection (OSI). The protocols of the layer provide host-to-host communication services for applications. It provides services such as connection-oriented data stream support, reliability, flow control, and multiplexing.
The details of implementation and semantics of the Transport Layer of the TCP/IP model (RFC 1122), which is the foundation of the Internet, and the Open Systems Interconnection (OSI) model of general networking, are easily compared. In the OSI model the transport layer is most often referred to as Layer 4 or L4, while numbered layers are not used in TCP/IP.
The best-known transport protocol of TCP/IP is the (TCP), and lent its name to the title of the entire suite. It is used for connection-oriented transmissions, whereas the connectionless (UDP) is used for simpler messaging transmissions. TCP is the more complex protocol, due to its stateful design incorporating reliable transmission and data stream services. Other prominent protocols in this group are the (DCCP) and the (SCTP).
Transport layer services are conveyed to an application via a programming interface to the transport layer protocols. The services may include the following features:
The transport layer is responsible for delivering data to the appropriate application process on the host computers. This involves statistical multiplexing of data from different application processes, i.e. forming data packets, and adding source and destination port numbers in the header of each transport layer data packet. Together with the source and destination IP address, the port numbers constitutes a network socket, i.e. an identification address of the process-to-process communication. In the OSI model, this function is supported by the session layer.