s是套接字描述符。
处理连接请求后,accept将返回新的套接字描述符。
Once a connection request is processed, a new socket descriptor is returned by accept.
socket系统调用还向创建的套接字描述符分配协议。
The socket system call also assigns the protocol to the created socket descriptor.
在返回到tcp_usrreq函数时,创建套接字描述符,以指向套接字的tcp控制块。
On returning to the tcp_usrreq function, the socket descriptor is made to point to the socket's TCP control block.
然后进行协议特定的调用pr_usrreq,进而切换到与套接字描述符关联的相应协议特定的请求。
A protocol-specific call, pr_usrreq, is then made, which switches to the corresponding protocol-specific request associated with the socket descriptor. The prototype of the pr_usrreq function is.
listen系统调用使用套接字描述符和listen调用中指定的backlog值调用solisten。
The listen system call calls solisten with the socket descriptor and backlog values specified in the listen call.
尽管recv(进程使用的库函数)、recvfrom和recvmsg仅可以对套接字描述符操作,但read和readv可以对任何种类的描述符操作。
While recv (a library function used by the process), recvfrom, and recvmsg operate only on socket descriptor, read and readv can operate on any kind of descriptor.
取而代之的是,只有包含关于数据的位置和长度的信息的描述符被追加到了套接字缓冲区。
Instead, only descriptors with information about the location and length of the data are appended to the socket buffer.
描述符可以表示到设备、管道或套接字的连接,这些连接用于与另一个进程或普通文件进行通信。
Descriptors might represent a connection to a device, pipe, or a socket for communicating with another process or to a normal file.
请记住,文件描述符包括诸如套接字之类的内容。
socket系统调用通过分配新的描述符创建新的套接字。
The socket system call creates a new socket by assigning a new descriptor.
此套接字的文件描述符对象。
此套接字的文件描述符对象。
应用推荐