Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private Queue<AsyncContext> clients = new ConcurrentLinkedQueue<AsyncContext>();
- protected void doGet(HttpServletRequest req, HttpServletResponse arg1)
- throws ServletException, IOException {
- AsyncContext ctx = req.startAsync();
- ctx.setTimeout(3000000);
- clients.add(ctx);
- System.out.println("new client connected." );
- }
Add Comment
Please, Sign In to add comment