两种方案: 1. TCP提供的keepalive 2. 应用层heartbeat机制keepalive 是系统内核就做好的东西,socket提供了设置启用的方法。原理是tcp连接闲置一段 ...
確定! 回上一頁