I write two programsne is to send data,another is to receive
data,and I register a message function,Look:
Code:
WSAAsyncSelect(m_sock,m_hWnd,WM_RNET,FD_READ);
void CTcpFSDlg::OnRNet(WPARAM wParam,LPARAM lParam)
{
char recvbuf[100];
int retval,err;
while(1)
{
retval=recv((SOCKET)wParam,recvbuf,100,0);
if(retval==SOCKET_ERROR)
{
err=WSAGetLastError();
str.Format("recv error=%d",err);
MessageBox(str);
break;
}
MessageBox(recvbuf);
}
}
when I send one message,this program can receive it,but it
receive a error number 10035,when I send more than one message,
I only receive the first message and error number 10035,
I want to know how to solve it?