Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为什么socket_shutdown($socket, 2);有时将套接字留在 CLOSE_WAIT 状态,尽管套接字在关闭后立即关闭socket_close($socket);?
socket_shutdown($socket, 2);
socket_close($socket);
它没有。CLOSE_WAIT 是由于在本地应用程序关闭此端之前收到来自对等方的传入关闭引起的。当应用程序关闭此端时,状态转换。关机与此无关。