Testing for a closed socket

后端 未结 3 1153
北荒
北荒 2021-01-04 19:45

I\'m trying to test for a closed socket that has been gracefully closed by the peer without incurring the latency hit of a double send to induce a SIGPIPE.

3条回答
  •  北荒
    北荒 (楼主)
    2021-01-04 20:08

    (Slightly "off topic", sorry). Perhaps this discussion may be helpful four you. It still doesn't answer to you "FIN" question, but may help you to react in a more easy way to the peer shutdown while your program is sending.

    Bye

提交回复
热议问题