The HTTP protocol defines 8 ways to send HTTP requests
Get, Post,options, head, PUT, delete, trace, connect, patch
According to the original design of the HTTP protocol, different methods have different ways to operate the resources:
Put: Increase
Delete: Delete
Post: Change
Get: Check
Tip: The most common is get and post (actually get and post can be added and deleted)
3 Handshake for TCP Connect
Procedure 1 Host A to host B by sending a data segment containing a flag of the synchronization sequence number, a connection to host B is requested, and through this data segment, host a tells Host B two things: I want to communicate with you, and which serial number you can use as the starting data segment to respond to me.
Procedure 2 when Host B receives a request from host A, it responds to host A with a data segment with a ACK (ACK) and a synchronous sequence number (SYN) flag bit, and also tells host a two things: I have received your request, you can transfer the data; Which serial number do you want to use as the starting data segment to respond to my
Procedure 3 When host a receives this data segment, it sends a confirmation reply confirming that the data segment of Host B has been received: I have received a reply and I am now going to start transmitting the actual data.
So three times the handshake is complete, and host A and Host B can transfer the data.
3-time handshake features no application layer of Data SYN This flag bit will be set only when TCP is built to connect 1, and the SYN flag bit is set after the handshake completes 0
/////////////////
//////////////////
The difference between TCP and UDP:
1. Connection-based and no-connection
2. Requirements for system resources (more TCP, less UDP)
3. The UDP program is simple in structure,
4. Stream mode and datagram mode
5.TCP guaranteed Data correctness UDP may drop packets; TCP guarantees data order, UDP is not guaranteed.
IOS-OC--TCP/UDP HTTP