I. CS architecture, BS architecture
(1) CS Architecture Introduction (client server, server architecture), for example: QQ, 360 network disk
(2) BS Architecture Introduction (broswer server, Browser server architecture) For example: browser
Second, TCP protocol learning 1
1. Focus on TCP understanding
(1) TCP protocol works on the transport layer, on the service socket interface, on the downgrade IP layer
(2) The TCP protocol is connection-oriented, and the communication must be established after 3 handshake before communication can begin.
(3) TCP protocol provides reliable transmission, not afraid of packet loss, disorderly sequence and so on.
2, how to ensure the reliable transmission of TCP
(1) TCP requires that both parties must shake hands before transmitting valid information to establish a connection to communicate
(2) When the receiver of TCP receives the packet, it will ack to the sender, and if the sender does not receive an ACK, it will lose the packet retransmission.
(3) Valid data content for TCP is accompanied by a checksum to prevent the content from being corrupted during delivery
(4) TCP will automatically adjust the adaptation rate (sliding window technology) based on the network bandwidth, and if the receiver receives less pressure, it will slowly increase the transmit rate, and the sender will slow down the sending speed when the receiver pressure is high.
(5) The sender will give each division message number, the receiver will check the number, once the order error will be re-transmitted.
Third, the TCP protocol learning 2
1, three handshake of TCP
(1) Three handshake required to establish the connection
(2) Condition of establishing connection: Client initiates connect when server listen
2, four handshake of TCP
(3) Four handshake required to close the connection
(4) Server or client can initiate shutdown
(iv) Linux network programming