First, network programming
1. Network, network protocol (set of rules)
2. Network model:
(1) seven-layer model - seven
The physical layer (such as cable, anchors), data link layer (such as voltage and current), the network layer, transport layer, session layer, presentation layer, application layer (our basic activity in this layer)
(2) four-layer model
Link layer, network, transport layer, application layer
(3) each has a corresponding protocol layer is responsible for the exchange of information or work
(4) TCP / IP protocol suite.
(5) IP Address: The only responsible for positioning a machine on the network
i.IP address ABCD is divided into categories
ii.IP address is composed of four segments of the digital, the digital value of each segment is 0-255
For example: 192.168.xxx.xxx: LAN ip
127.0.0.1 on behalf of the machine
IPV4、IPV6
. Iii Port:
Range: 0-65535 well-known ports: Non-0-1023 well-known ports: 1024-655535
(6) TCP / UDP protocol
UDP: non-secure link is not oriented transmission
. I poor safety;. Ii size limit of 64kb;. Iii no sequence;. Iv speed block
TCP: link-based communications
(7) SOCKET programming
i.socket (socket): is the endpoint of a communication network, enables different host-process communication, network mostly based on socket communication
and ii. IP + port is located other communication mechanism and sends information
iii. into UDP and IP
Second, the source
2.CSDN: https: //blog.csdn.net/weixin_44630050 (Xi Jun Jun Moods do not know - Rui)
3. Park blog: https: //www.cnblogs.com/ruigege0000/
4. Welcomes the focus on micro-channel public number: Fourier transform public personal number, only for learning exchanges, backstage reply "gifts" to get big data learning materials