socket在什么情况下可读?

  1. 接收缓冲区有数据,一定可读
  2. 对方正常关闭socket,也是可读
  3. 对于侦听socket,有新连接到达也可读
    4.socket有错误发生,且pending

发表评论

后才能评论