Transportlayer
The transport layer is the fourth layer of the OSI model and a fundamental part of the Internet protocol suite. It provides end-to-end communication services for applications running on host machines. Positioned above the network layer (IP) and below the application layer in common model mappings, the transport layer delivers data between processes identified by port numbers, enabling multiplexing of multiple conversations over a single network connection.
Key functions include segmentation or message boundaries, reliable data transfer, flow control, congestion control, error detection,
TCP offers a reliable, connection-oriented service with in-order delivery, sequencing, acknowledgments, and flow and congestion control.
UDP provides a lightweight, connectionless, best-effort service with minimal overhead and no guarantee of delivery or
Other transport protocols exist, such as SCTP (which supports multi-streaming and multi-homing) and DCCP (datagram congestion-controlled).
In practice, applications select the transport protocol that matches their requirements for reliability, latency, and ordering.