If there's already a listening socket on a port, then the state of the socket is changed to listen.
如果端口上已存在侦听的套接字,则将套接字的状态更改为LISTEN。
If the socket is not a listening socket, then control falls to soclose to check if there is already a control block attached to the socket.
如果套接字不是侦听套接字,则控制开始使用soclose,以检查是否已存在附加到套接字的控制块。
The soo_close() simply calls the so_close() function, which first checks if the socket to be closed is a listening socket (socket that's accepting incoming connections).
soo_close() 仅调用 so_close() 函数,该函数首先检查要关闭的套接字是否为侦听套接字(正在接收传入连接的套接字)。
应用推荐