Topic: The relationship between TCP and UDP, and the relationship between TCP and HTTP.
The transport layer primarily provides end-to-end communication for applications on two hosts. In the TCP/IP protocol family, there are two different transport protocols: TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).
TCP provides high-reliability data communication for two hosts. The work that it does involves putting the data that the application gives to it into the appropriate small pieces to the following network layer, confirming the received packet, setting the timeout clock to send the last acknowledgment packet, etc. Because the transport layer provides highly reliable end-to-end communication, the application layer can ignore all of these details. UDP, on the other hand, provides a very simple service for the application layer. It only sends packets called datagrams from one host to another, but does not guarantee that the data will reach the other end. Any required reliability must be provided by the application layer.
HTTP (Hypertext Transfer Protocol) is a protocol that leverages TCP to transfer information between two computers, typically Web servers and clients. The client initiates an HTTP request to the Web server using a Web browser, and the Web server sends the requested information to the client. TCP is a mechanism that allows us to securely transmit data, and HTTP, which uses the TCP protocol to transmit data, is a special protocol used by Web servers and clients.
201,500-degree Android development post a simple answer: TCP, UDP, HTTP relationship