title: how can I determine the maximum value of 'backlog' that is allowed on the current system?
body: <p>I'm playing with ServerSocket and I don't see / find what the <strong>limit</strong> of the <strong>backlog</strong> is. The docs don't say anything about this:</p>
  
  <p><a href="http://download.oracle.com/javase/6/docs/api/java/net/ServerSocket.html#ServerSocket(int" rel="nofollow">http://download.oracle.com/javase/6/docs/api/java/net/ServerSocket.html#ServerSocket(int</a>, int)</p>
  
  <p>My code is like this:</p>
  
  <pre><code>serverSocket = ServerSocketChannel.open();
  serverSocket.socket().bind(null, 10000);
  </code></pre>
  
  <p>but I assume that 10000 might be too much if a system doesn't have enough RAM. So is there a way to determine the maximum value for <strong>backlog</strong> that I can use? </p>
  
  <p>It seems like in c++ you can use SOMAXCONN - does something similar exist for Java?</p>