How to solve the error number 10035?

This is a discussion on How to solve the error number 10035? within the Networking/Device Communication forums, part of the General Programming Boards category; I write two programs ne 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); ...

  1. #1
    Registered User
    Join Date
    Jun 2011
    Posts
    50

    How to solve the error number 10035?

    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?

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    2,541
    Windows Sockets Error Codes

    WSAEWOULDBLOCK
    10035

    Resource temporarily unavailable.

    This error is returned from operations on nonblocking sockets that cannot be completed immediately, for example recv when no data is queued to be read from the socket. It is a nonfatal error, and the operation should be retried later. It is normal for WSAEWOULDBLOCK to be reported as the result from calling connect on a nonblocking SOCK_STREAM socket, since some time must elapse for the connection to be established.
    Google is your friend.

    Tim S.
    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the Universe is winning." Rick Cook

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. who could help me for error number 10035
    By leetow2003 in forum Windows Programming
    Replies: 4
    Last Post: 08-18-2011, 07:39 PM
  2. Have an error that i can't solve
    By mdennis10 in forum C++ Programming
    Replies: 5
    Last Post: 04-15-2011, 11:11 AM
  3. how to solve this error msg
    By rhythm in forum C++ Programming
    Replies: 11
    Last Post: 02-08-2008, 09:05 PM
  4. Odd error i cant solve
    By c++.prog.newbie in forum C++ Programming
    Replies: 0
    Last Post: 09-15-2005, 09:08 AM
  5. please help me to solve the error
    By Jasonymk in forum C++ Programming
    Replies: 8
    Last Post: 05-02-2003, 09:08 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21