TCPUDPheaders
TCP and UDP headers are the two header types used by the transport layer in the Internet protocol suite. They accompany the payload of transport-layer segments or datagrams and determine how the data is delivered to the receiving application. TCP headers belong to a reliable, connection-oriented service, while UDP headers belong to a simpler, connectionless service. Both headers are described in RFCs (TCP in RFC 793, UDP in RFC 768) and are extended by later standards.
The TCP header is at least 20 bytes long and includes fields for source and destination ports,
The UDP header is fixed at 8 bytes and consists of source port, destination port, length, and
Key differences include: TCP is connection-oriented and reliable with error checking and congestion control, while UDP