27. in-depth understanding of computer system notes and Network Programming

Source: Internet
Author: User

1. Each network application is based on the client-server model. The basic operation in the client-server model is the transaction (here the transaction is different from the transaction in the database, there is no database transaction feature, such as atomicity, at this time, the original transaction is only a series of steps executed between the client and the server ). Realize that the client and server are processes, rather than machines or hosts that are often called in the context.

2. Network

One Ethernet segment, including cables and hubs; each cable has the same maximum bandwidth; The Hub copies each bit received on one port to all other ports without additional points. Therefore, each host can view each bit.

Using cables and bridges, multiple Ethernet segments can be connected to a large LAN, called bridging Ethernet. The bandwidth of these cables can be different.

Multiple incompatible LAN can be connected by a special computer called a router to form an Internet interconnected network.

3. Data Transmission

PH: internet packet header, FH: frame Header

4. Because the Internet hosts can have different host byte sequences, TCP/IP defines the same network byte sequence and large byte sequence for any integer data item.

5. Internet connection

Socket is the end-point of the connection ). Each socket has a corresponding socket address, which is composed of an Internet address and a 16-bit integer port, expressed by "Address: Port.

A connection is uniquely identified by the socket addresses at both ends of the connection. This socket address is called a socket pair: (cliaddr: cliport, servaddr: servport)

6. Socket interface

A socket interface is a set of functions used to create network applications in combination with unit I/O functions.

From the perspective of unit kernel, socket is the communication endpoint; from UNIXProgramThe socket is an open file with the corresponding descriptor.

7. EOF is a condition detected by the kernel, which exceeds the end of the file.

Related Article

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.