65,211
社区成员
发帖
与我相关
我的任务
分享
int val = send(pClient->m_socket, pClient->m_data.buf, nSendlen,0);
//处理返回错误
if (SOCKET_ERROR == val)
{
int nErrCode = WSAGetLastError();
if (nErrCode == WSAEWOULDBLOCK)//发送数据缓冲区不可用
{
continue;
}else if ( WSAENETDOWN == nErrCode ||
WSAETIMEDOUT == nErrCode ||
WSAECONNRESET == nErrCode)//客户端关闭了连接
{