15,979
社区成员
发帖
与我相关
我的任务
分享
CString strRec, strTmp;
const int MAX_CHAR 100;
while(true)
{
recvfrom(s,strRec.GetBuffer(MAX_CHAR), MAX_CHAR,0,(sockaddr*)&sAddrInRec,&len);
sprintf(strTmp.GetBuffer(MAX_CHAR),"%s 说:%s \r\n",inet_ntoa(sAddrInRec.sin_addr),strTmp.GetBuffer(MAX_CHAR));
sendBox->SetWindowText(strTmp);
}