简体   繁体   中英

Long polling and other fallback support for Websocket using Jetty 9

有人可以让我知道如何使用Jetty 9为websocket添加长时间轮询和其他后备支持吗?

I generally recommend using something like CometD ( http://www.cometd.org ) which will be releasing version 3 fairly soon which will support Jetty 9. Another option would be to look at the Atmosphere project.

Using a messaging framework like these let you have the framework handle finding the best protocol to use, be it SPDY, Websocket, HTTP/1.1 or even polling HTTP/1.0....and they isolate you from future protocols like HTTP/2 which is coming (slowly) which is based on spdy. Using CometD once that protocol lands and becomes available get it for free, no changes needed in your app.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM