current position:Home>HTTP network protocol

HTTP network protocol

2022-04-29 05:44:45Game programming

1、 By coverage

1.1 LAN LAN ( The range of action is generally several meters to tens of kilometers )
1.2 Metropolitan area network MAN ( Bound in WAN And LAN Between )
1.3 Wide area network WAN ( The range of action is generally tens to thousands of kilometers )

2、TCP/IP The level of

TCP/IP                         OSI Network reference model
1、 The physical layer Optical fiber , Twisted pair cable , Wireless devices         The physical layer
2、 Data link layer Ethernet Ethernet, wireless LAN        Data link layer
3、 The network layer IPv4, IPv6, ARP, ICMP            The network layer
4、 Transport layer TCP, UDP, SCTP               Transport layer
5、 application layer DNS, HTTP, SSH, SMTP, FTP...  1、 The session layer 2、 The presentation layer 3、 application layer

3、HTTP Hierarchical parsing process of requests

HTTP Network protocol - The first 1 Zhang

4、HTTP Message format

HTTP Network protocol - The first 2 Zhang

5、 Request line message format

HTTP Network protocol - The first 3 Zhang

METOD Request method : Such as GET/HEAD/PUT/POST, Represents an operation on a resource
URI   Request the target : It's usually a URl, Marked the resource that the request method will operate on
VERSLON Version number : Indicates the HTTP Protocol version

6、 Response line message format

HTTP Network protocol - The first 4 Zhang

VERSION Version number : Indicates the HTTP Protocol version
SEATUS Status code K: A three digit number , Express the result of processing in the form of code , such as 200 To be successful , 500 It's a server error
REASON reason : As a supplement to the digital status code , The text is more detailed , Help people understand why

7、HTTP Header fields

HTTP Network protocol - The first 5 Zhang
HTTP Network protocol - The first 6 Zhang
HTTP Network protocol - The first 7 Zhang

8、 The number of handshakes

HTTP Network protocol - The first 8 Zhang

9、TCP agreement

TCP (Transmission Control Protocol) :
Connection oriented , reliable , Transport layer communication protocol based on byte stream

characteristic

1、 Connection based : A connection needs to be established before data transmission
2、 full duplex : Two way transmission
3、 Byte stream : Unlimited data size , Pack it into a newspaper section , Ensure orderly reception , Duplicate packets are discarded automatically
4、 Traffic buffering : Solve the mismatch between the two sides' processing capacity
5、 Reliable transmission services : Guaranteed access to , In case of packet loss, reliability is achieved by retransmission mechanism
6、 Congestion control : Prevent the network from vicious congestion

10、TCP Link management

1、tcp Connect : Four tuple [ source address , Source port , Destination address , Destination port ]
2、 Establishing a connection : TCP Three handshakes
  a. Initial serial number of both sides of synchronous communication (lSN, initial sequence number)
  b. negotiation TCP Communication parameters (MSS, Window information , Specify the check sum algorithm )
How to shake hands

HTTP Network protocol - The first 9 Zhang
HTTP Network protocol - The first 10 Zhang

TCP Send many times at once

HTTP Network protocol - The first 11 Zhang

author : Xiao Zheng

Game programming ️, A game development favorite ~

If the picture is not displayed for a long time , Please use Chrome Kernel browser .

copyright notice
author[Game programming],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/116/202204261029495024.html

Random recommended