10055由于系统缓冲区空间不足或列队已满,不能执行套接字上的操作。
 
我出这个错啊!!!我BUF很大啊!
而且我每次收之前都用ZeroMemory(Buf,sizeof(Buf));清空了的呀,
怎么会不足啊! 
是怎么样引起这个问题的呀!而且开始执行并没有问题,但是执行一段时间后就会出这个错误,然后就断了!

解决方案 »

  1.   

    >>我出这个错啊!!!我BUF很大啊!是系统缓冲区满了。跟你的buf没关系。。估计你写的是服务器程序,由于接受数据包太多,把系统缓冲区装满了。后面再接收数据就报此错误。
      

  2.   

    我接收的时候出这个错误啊!
    我是自定义的BUF啊!没有用到系统缓冲呀?
    char Buf[10240*6];for(;;)
    {
    FD_ZERO(&fdread2);
    FD_SET(ToServerSocket, &fdread2); 
    int ret=select(NULL,&fdread2,NULL,NULL,NULL);
    if(ret>0)
    {
    if (FD_ISSET(ToServerSocket, &fdread2))
    {
    ZeroMemory(Buf,sizeof(Buf)); //清空缓冲区
    lenth=recv(ToServerSocket,Buf,tmpbuflen-2,0);//接收
    if(lenth<0)
    {
    int err=WSAGetLastError();
    CString str;
    str.Format("ToServerSocket:%d",err);
    MessageBox(NULL,str,"wrong",MB_OK);
                               closesocket(ToServerSocket);
    AfxEndThread(0);
    }
               }
    }
    }N次之后就弹出10055这个错误!
      

  3.   

    把你的SOCKET设置为"0接收缓冲区,0发送缓冲区".
      

  4.   

    回复人: huangbeyond(校园人渣) ( ) 信誉:105  2003-11-20 21:06:00  得分:0 
     
     
      把你的SOCKET设置为"0接收缓冲区,0发送缓冲区".
      
     
    什么意思?不懂?
      

  5.   

    WSAENOBUFS should occur when the system has not enough memory or other system resources to open new TCP/IP socket or to handle socket data. It looks like that in most cases the problem occurs when total count of opened sockets reaches some magical number. MS writes that this limit is 3976 simultaneously opened sockets but it seems that on Win9x systems the real limit is much lower. 
    Proxy+ uses permanently about 10-20 opened sockets (it depends on configuration, number of defined Mapped Links,...) and each client request allocates two sockets  - one for client side and one for server side of connection. Because TCP/IP system doesn't free sockets immediately when they are closed (socket remains allocated for 240 seconds after application closes it) it is possible that system will report WSAENOBUFS due to lack of free socket resources.
    我找到资料了,看不太懂。不过我的程序就是一个Proxy,它里面说好像connect多了?可是我只有一个连接呀?而且好像还是BUF的问题。没有人能帮我了吗?