The first part: basic knowledge
1.OSI seven-layer network model: The OSI network model is a reference model for open Systems interconnection. It includes 1, physical hardware layer, 2, Data link layer, 3, network layer, 4, data transmission layer, 5, Session layer, 6, presentation layer, 7, application layer. At the sending end of the network communication, the communication data of each communication layer is added to the data by the layer protocol, and the receiver is the opposite, the data through each layer will be stripped of the corresponding packet header data.
Definition of each network layer
Physical hardware layer: As the name implies, the corresponding physical devices, such as network cards, etc.
Data link layer: Compress and compress data
Network layer: Transfer data for network transmission
Data transfer layer: Network transmission of information
Session Layer: Establishing a connection to a physical network
Presentation layer: Transmits data in a format
Application Layer: Application interface
2.TCP/IP protocol
The network model of TCP/IP protocol is only 4 layers, including data link layer, network layer, data transmission layer and application layer.
Each network layer definition
Data Link layer: Network hardware devices such as NIC and drivers
Network layer: IP protocol and other interconnection protocols
Data transfer layer: Provides communication methods for the application, usually the TCP/UDP protocol
Application layer: Responsible for processing the actual application layer protocol
3.C/S programming Model
Listening process: The server waits for the arrival of the client connection request (on a specific IP address and port);
Visual C + + network programming--Notes