如题,请解释详细点

解决方案 »

  1.   

    连接请求的最大队列长度,注意不是请求的最大数,如果请求没有当时处理,就会放入队列中,如果队列长度超过设置的值就会抛异常:java.net.ConnectException: Connection refused: connect
      

  2.   

    backlog - the maximum length of the queue
    The maximum queue length for incoming connection indications (a request to connect) is set to the backlog parameter. If a connection indication arrives when the queue is full, the connection is refused.通俗地说,就是最大连接字长度。Socket能监听端口上的队列消息,但是如果指定了backlog的话,就会对连接字的长度进行校验,长于最大长度的话,就拒绝该连接。