这是一种保举的完成Comet的做法,翻开一个到服务器真个Ajax哀求然后守候呼应。服务器端必要一些特定的功效来同意哀求被挂起,只需一有事务产生,服务器端就会在挂起的哀求中送反响应并封闭该哀求。然后客户端就会利用这一呼应并翻开一个新的到服务器真个永生存期的Ajax哀求。
ThisisarecommendedmethodtoimplementCometistoopenanAjaxrequesttotheserverandwaitfortheresponse.Theserverrequiresspecificfeaturesontheserversidetoallowtherequesttobesuspended.Assoonasaneventoccurs,theserversendsbacktheresponseinthesuspendedrequestandclosesit.Theclientthenconsumestheresponseandopensanewlong-livedAjaxrequesttotheserver.
欢迎光临 仓酷云 (http://www.ckuyun.com/) | Powered by Discuz! X3.2 |