How can I tell if the connection has been broken in my sockets based client?

前端 未结 6 1060
小鲜肉
小鲜肉 2020-12-11 18:11

If my client\'s connection is broken on the other end( kill -9 server). It takes several minutes for the client to determine that something is wrong. Sock

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-11 18:14

    Maybe the SendTimeout and/or ReadTimeout properties of the Socket could help?

提交回复
热议问题