a . TCP/IP stands for Transmission Control Protocol/Internet Protocol, which refers to a series of co-groups.
Can be divided into four levels: data link layer, network layer, Transport layer and application layer.
At the network layer: There are IP protocols, ICMP protocols, ARP protocols, RARP protocols, and BOOTP protocols. In the transport layer: there is the TCP protocol with the UDP protocol. In the application layer: There are FTP, HTTP, TELNET, SMTP, DNS and other protocols.
TCP and UDP use the IP protocol to transfer packets from one network to another network. Think of IP as a highway that allows other protocols to travel and find the exits of other computers. TCP and UDP are "trucks" on highways, and the goods they carry are protocols such as HTTP, File Transfer Protocol FTP, and so on.
TCP and UDP are transport layer protocols that are used, such as Ftp,http and SMTP. Although both TCP and UDP are used to transmit other protocols, they have a significant difference: TCP provides guaranteed data transfer, and UDP does not. This means that TCP has a special mechanism to ensure that data is safe from one endpoint to another without error, and UDP does not provide any such assurance.
Two.HTTP itself is a protocol that transmits hypertext to a local browser from a Web server.
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.
The HTTP protocol is built on the request/ response model. First the client establishes a TCP link to the server and sends a request to the server, which contains the request method, URL, protocol version, and
The associated MIME-style message. The server responds to a status line that contains the protocol version of the message, a success and failure code, and the associated MIME style message. http/1.0 establishes a new TCP link for each HTTP request/response, so a page containing HTML content and pictures will need to establish multiple short-term TCP links. Establishment of a TCP link at a time
3 handshakes will be required. In addition, in order to obtain the appropriate transfer speed, TCP is required to spend additional loop link time (RTT). The creation of each link requires this recurring overhead, and it does not carry data that is actually useful
, the link is guaranteed to be reliable, so HTTP/1.1 provides a way to implement a sustainable link. http/1.1 will only establish a TCP link and repeatedly use it to transmit a series of request/response messages,
This reduces the number of link builds and the recurring link overhead.
Although HTTP itself is a protocol, it is ultimately TCP-based.
Three. SOCKET:TCP/IP the network API.
A socket is an intermediate software abstraction Layer that the application layer communicates with the TCP/IP protocol family, which is a set of interfaces . In design mode, the socket is actually a façade mode, it is the complex TCP/IP protocol family hidden behind the socket interface, for the user, a set of simple interface is all, let the socket to organize data to meet the specified protocol.
The Socket interface is a TCP/IP network Api,socket interface that defines many functions or routines for developing applications on TCP/IP networks.
This is to achieve the above communication process to establish a communication pipeline, its real representative is a client and server side of a communication process, the two sides of the process through the socket communication, and the rules of communication
Use the specified protocol. Socket is just a connection mode, not a protocol, TCP,UDP, simple (although inaccurate) is the two most basic protocol, many other protocols are based on these two protocols, such ashttp
is TCP-based, a socket can be used to create a TCP connection, or you can create a UDP connection , which means that a socket can be used to create a connection to any protocol, because other protocols are based on this.
In summary: IP protocol is required to connect to the network; 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. HTTP is based on the TCP protocol, but the socket can be used to establish a TCP connection.
Differences/connections between HTTP, TCP, UDP, and sockets