摘要:
断线检测 tcp的断线检测,是分为两种的: ① 利用tcp自带的keep –alive机制 ② 自己组建心跳包的方式向对端发送 Keep_alive机制 通过Keep-alive机制对tcp的连接保持,也就是Tcp的心跳包,见MSDN: If keep-alive is enabled for a TCP socket with SO_KEEPALIVE, then the default TCP settings are used for the keep-alive timeout and interval unless these values have been chang... 阅读全文