What socket error do I get when TCP keep-alive breaks the connection?

前端 未结 2 1113
粉色の甜心
粉色の甜心 2020-12-14 12:24

I have a set of TCP sockets with keep-alive (interval 1 min), controlled by a select(2) loop (selecting for read).

  • Will select(2) return an erro
2条回答
  •  无人及你
    2020-12-14 12:55

    select() sets a bit in the FDSET that indicates which socket has triggered. Use FD_ISSET macro to determine which socket asked for service.

提交回复
热议问题