Winsocket中的链路检测
平时做链路检测,都是构造一个结构体,然后发送出去。以此来检测链路,今天在查msdn中send函数中看到这么一句话,
Calling send with a zero len parameter is permissible and will be treated by implementations as successful. In such cases, send will return zero as a valid value. For message-oriented sockets, a zero-length transport datagram is sent.
那么是不是就是说,只要我把len的参数给0的话,那么如果返回0值就是通了,要不然就是不通了 。。。