(iv) Linux network programming

Source: Internet
Author: User
Tags ack

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

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.