title: Determine maximum websockets jetty will open
body: <p>I am trying to figure out how to get the maximum number of websockets that jetty will allow to open. It seems to peak at 254 from my laptop chrome. I am trying to determine if it's chrome limitation or jetty limitation or something else.</p>
  
  <pre><code>package jetty;
  
  import org.eclipse.jetty.server.Server;
  import org.eclipse.jetty.websocket.server.WebSocketHandler;
  import org.eclipse.jetty.websocket.servlet.WebSocketServletFactory;
  
  public class WebSocketTest {
  
  public static void main(String[] args) throws Exception {
      Server server = new Server(8383);
      WebSocketHandler wsHandler = new WebSocketHandler() {
          @Override
          public void configure(WebSocketServletFactory factory) {
            factory.getPolicy().setIdleTimeout(-1);
            factory.register(MyWebSocketHandler.class);
          }
      };
  
      server.setHandler(wsHandler);
      server.start();
      server.join();     
  
  }
  
  }
  </code></pre>