The Linux kernel treats all external devices as a file to operate, and the read and write operations on a file will call the system command provided by the kernel and return a file descriptor (fd, file descriptor). The reading and writing of a socket will also have a corresponding descriptor, called socketfd (socket descriptor). The descriptor is a number, which points to a structure in the kernel (file path, data area and other attributes).
According to the classification of I/O models by UNIX network programming, UNIX provides five I/O models, as follows.
(1) Blocking I/O model:
(2) Non-blocking I/O model:
(3) I/O multiplexing model:
(4) Signal-driven I/O model:
(5) Asynchronous I/O:
Linux Network I/O Model
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=326398110&siteId=291194637
Recommended
Ranking