IOS-OC--TCP/UDP HTTP

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.