Guest User

Untitled

a guest
Jun 25th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. private Queue<AsyncContext> clients = new ConcurrentLinkedQueue<AsyncContext>();
  2.  
  3. protected void doGet(HttpServletRequest req, HttpServletResponse arg1)
  4. throws ServletException, IOException {
  5. AsyncContext ctx = req.startAsync();
  6. ctx.setTimeout(3000000);
  7. clients.add(ctx);
  8. System.out.println("new client connected." );
  9. }
Add Comment
Please, Sign In to add comment