Package org.auto.comet

Examples of org.auto.comet.PushSocket


      String uri = RequestUtils.getServletPath(request);
      throw new DispatchException("Cant find comet handler by [" + uri
          + "]. Did you registered it?");
    }

    PushSocket socket = new PushSocket();
    boolean accept = service.accept(socket, request);
    PrintWriter write = response.getWriter();
    String commend = null;
    if (accept) {// 如果接受连接请求则创建连接
      socketManager.creatConnection(socket);
      commend = JsonProtocolUtils.getConnectionCommend(socket.getId());
    } else {// 如果拒绝连接请求
      commend = JsonProtocolUtils.getConnectionCommend(null);
    }
    // 返回生成的链接id
    write.write(commend);
View Full Code Here

TOP

Related Classes of org.auto.comet.PushSocket

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.