In Linux, the s type file refers to the "socket file (socket)", which is a special file used for communication between processes; a network can be initialized through this file protocol, and then you can use a series of functions to initialize, transmit, etc. the network protocol.
#The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.
Linux file types (b, c, d, l, s, -)
Description | |
---|---|
Block devices are interface devices that provide system access to data, such as hard disks. | |
Character devices are interface devices for some serial ports, such as keyboards, mice, printers, and tty terminals. | |
Directory, similar to Windows folders. | |
Link file, similar to Windows shortcut. | |
Socket file (socket), used for communication between processes. | |
Files are divided into plain text files (ASCII) and binary files (binary). |
socket definition
Socket is the middle software abstraction layer for communication between the application layer and the TCP/IP protocol family , which is a set of interfaces. In the design mode, Socket is actually a facade mode, which hides the complex TCP/IP protocol family behind the Socket interface. For users, a set of simple interfaces is all, allowing Socket to organize data to meet the specified requirements. ProtocolThe structure of socket in the Linux kernel
The socket is actually a structure in the kernel. This structure contains members such as ip, port, state, size, etc. These members are used to initialize the detailed information of the socket, but we cannot use these members directly. Therefore, Linux provides corresponding interface functions for me to call. We use these functions to initialize the members in the socket structurein the structure
Linux Video Tutorial"
The above is the detailed content of What is linux s type file. For more information, please follow other related articles on the PHP Chinese website!