本帖最后由 VisualEleven 于 2011-02-28 14:38:37 编辑

解决方案 »

  1.   

    int listen(
      __in  SOCKET s,
      __in  int backlog
    );Parameters

    A descriptor identifying a bound, unconnected socket.backlog 
    The maximum length of the queue of pending connections. If set to SOMAXCONN, the underlying service provider responsible for socket s will set the backlog to a maximum reasonable value. There is no standard provision to obtain the actual backlog value.
      

  2.   

    那应该是以前版本socket 的限制.
    msdn 如下解释
     Maximum length of the queue of pending connections. If set to SOMAXCONN, the underlying service provider responsible for socket s will set the backlog to a maximum reasonable value. There is no standard provision to obtain the actual backlog value. 
      

  3.   

    也就是说支持最大连接?而不是5个把?这个定义一般情况下XP SP3 下能支持多少连接?在哪儿能找的到?
      

  4.   

    这个表示同时连接上来的socket,再没有被accpet前,可以保存的最大长度,超过长度的socket将被废弃,客户端连接将得到连接超时错误