The transport layer connects application endpoints across an IP network. TCP and UDP both use 16-bit port numbers, but they expose different communication models and guarantees to applications.
Network Basics · Lesson 6
Transport Layer
Learn how TCP and UDP use ports and different delivery semantics between application endpoints.