18,356
社区成员
发帖
与我相关
我的任务
分享
#define BUFSIZE 1024
int SendMail::RcvServMsg(void)
{
char buf[BUFSIZE] = {0};
if(::recv(this->iSocket,buf,sizeof(buf),0) == -1)
{//接受服务器的回馈数据失败
::closesocket(this->iSocket);
this->bConn = false;
return SM_RCV_INFO_FAILD;
}
this->sRcvReturnMsg.assign(buf);
::memcpy(this->cCode,buf,3);
this->cCode[3] = 0;
return 0;
}