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.