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.
我正在使用select()调用读取和写入套接字 如何检测另一端是否关闭了套接字?本质上如何在使用时检测破损的管道select()?
select()
如果套接字从另一端正常关闭,select 将报告read套接字的条件。如果连接因其他原因丢失,将报告其中一个read或条件。error
read
error