What is TCP, UDP, HTTP, HTTPS protocol?

TCP

Transmission control protocol is a connection-oriented, reliable transport layer protocol based on a stream of bytes defined by the IETF RFC793.

TCP main features:

1. The connection-oriented: 
     (1) prior to the application using the TCP protocol, a TCP connection must be established. 
     (2) After the completion of the data transfer, you must release the TCP connection has been established. 
2. Each TCP connection can only point to point (one to one)
3. To provide reliable delivery of services:    (1) connected by a TCP data transfer, error-free, not lost, not repeat, and arrive out of order;
4. providing full-duplex communication: (1) the application process TCP allows communication between the two sides can transmit data at any time. (2) are provided at both ends of the TCP connection transmitting buffer and receiving buffer for temporarily storing data bidirectional communication. (3) when sending the application to transfer data to the TCP buffer, you can do your own thing, and TCP to send out the data at the right time.    (4) Upon receiving, TCP data received into the cache, the upper application process reads data in the cache at the right time.
The byte stream and: (. 1) in the TCP byte stream refers to a sequence of process flows to the process or left out.

UDP

Internet protocol suite supports a connectionless transport protocol, the protocol called User Datagram Protocol. UDP provides a method for IP datagrams can be sent without establishing a connection for the application package. RFC768 describes the UDP

UDP main features:

1. Connectionless: 
      (. 1) the UDP is connectionless, ie without the need to create a connection (no connection can be released at the end of data transmission) is reduced communication overhead and latency before data transmission. 
2. The best effort: (1) does not guarantee reliable delivery, so the host does not need to maintain complex connection status.
3. oriented packet: (1) cross only at the application layer down to the packet header after increasing IP layer delivered downwardly.
4. No congestion control: (. 1) blocking the UDP is controlled, even in the presence of network congestion, it will not affect the transmission frequency of the transmission side.
5. Support one to one, one to many, and many-to-many interactive communications;
6. header overhead is small (only four fields: source port, destination port, a length, and testing): (1) only 8 bytes, it is more than the first 20 bytes of TCP shorter

HTTP

1. http is a simple request - response protocol, which typically runs on top of TCP. 
2. It specifies the client may send a message to the server, and what kind of response obtained. 
3. The request and response message header given in the form of ASCII codes; and the message content having a MIME format similar. 
4. This simple model is the early success of Web meritorious, because it makes the development and deployment is so straightforward.

http Main features:

1. Supports client / server model. 
2. simple and fast: 
      (1) customer service request to the server, instead of sending the request method and path. 
      (2) request method commonly used GET, HEAD, POST. Each method provides a different type of client contacts the server. 
      (3) Due to the simple HTTP protocol, HTTP server programs such small, and therefore very fast communications. 

3. Flexible: 
      (. 1) allows the transmission of the HTTP data objects of any type. 
      (2) type being transmitted by the Content-Type (Content-Type HTTP packet is used to indicate the type of content identifier) to be labeled. 

4. No connection: 
      (1) limit the meaning connectionless only one request per connection. 
      (2) server processes client requests and receives the customer's response, i.e., disconnected. 
      (3) in this way can save transmission time. 

5. Stateless: 
      (. 1) the HTTP protocol is stateless protocol. 
      (2) refers to a protocol for stateless transaction processing without memory. 
      (3) the lack of state means that the subsequent processing required if the foregoing information, it must be retransmitted, which may result in the amount of data transmitted for each connection is increased. 
      (4) On the one hand, it is not necessary prior information in its response to the server faster.

HTTPS

(In short, to http encrypted)

1. HTTPS is a secure HTTP channel targeting, on the basis of HTTP to ensure the security of the transmission through the transmission encryption and authentication. 
2. Add to HTTPS based on SSL layer under HTTP, HTTPS security infrastructure is SSL, and therefore requires detailed encrypted SSL. 
3. HTTPS is present (between the TCP and HTTP) HTTP is different from the default port and an encryption / authentication layer. 
4. The system provides authentication and encrypted communications methods. 
5. Now it is widely used on the World Wide Web security-sensitive communications, such as terms of trade payments.

HTTPS main features:

1. Based on the HTTP protocol, provided by SSL or TLS encryption data, verify each other's identity and data integrity protection 

2. Content encryption: 
    (1) hybrid encryption technology, can not be viewed directly by the intermediate plaintext content 

3. Verify the identity: 
    (1 ) accessed by a client certificate authentication own server 

4. data integrity protection: 
    (1) preventing the content transmission is tampered with or posing as an intermediary

Guess you like

Origin www.cnblogs.com/pungchur/p/11918382.html