MSDN上是这样解释的:
Return Values
If no error occurs, recv returns the number of bytes received. If the connection has been gracefully closed, the return value is zero. Otherwise, a value of SOCKET_ERROR is returned, and a specific error code can be retrieved by calling WSAGetLastError.
看样子是“如果连接被愉快的关闭了,则返回值为0”。我的英语不是很好,但是我想大概是这个意思吧。